-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (59 loc) · 1.75 KB
/
deploy-dockerhub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# web-core image is meant to be used only by our safe-infrastructure repository
name: Deploy to Dockerhub
on:
push:
branches:
- main
- dev
release:
types: [ released ]
jobs:
dockerhub-push:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || (github.event_name == 'release' && github.event.action == 'released')
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: docker/setup-buildx-action@v3
- name: Dockerhub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Deploy Main
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6
with:
push: true
tags: safeglobal/safe-wallet-web:staging
platforms: |
linux/amd64
linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy Develop
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v6
with:
push: true
tags: safeglobal/safe-wallet-web:dev
platforms: |
linux/amd64
linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy Tag
if: (github.event_name == 'release' && github.event.action == 'released')
uses: docker/build-push-action@v6
with:
push: true
tags: |
safeglobal/safe-wallet-web:${{ github.event.release.tag_name }}
safeglobal/safe-wallet-web:latest
platforms: |
linux/amd64
linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max