-
Notifications
You must be signed in to change notification settings - Fork 27
134 lines (115 loc) · 4.58 KB
/
docker-latest.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Docker latest image
on:
push:
paths-ignore:
- '.gitignore'
- 'README.md'
- 'LICENSE'
- 'docs'
branches: [main]
workflow_dispatch:
env:
GLOBAL_IMAGE_NAME: universalregistrar/uni-registrar-web
GLOBAL_REPO_NAME: docker.io
jobs:
build-context:
runs-on: ubuntu-latest
steps:
- uses: danubetech/github-action-log-build-context@v0.1.0
publish-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Import Secrets
uses: hashicorp/vault-action@v2.3.0
with:
url: ${{ secrets.VAULT_ADDR }}
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }}
caCertificate: ${{ secrets.VAULTCA }}
secrets: |
ci/data/gh-workflows/${{ env.GLOBAL_REPO_NAME }} username | DOCKER_USERNAME ;
ci/data/gh-workflows/${{ env.GLOBAL_REPO_NAME }} password | DOCKER_PASSWORD ;
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL
- name: Build image
run: docker build . -f uni-registrar-web/docker/Dockerfile -t "${{ env.GLOBAL_REPO_NAME }}/${{ env.GLOBAL_IMAGE_NAME }}"
- name: Login user to repo
run: echo "${{ env.DOCKER_PASSWORD }}" | docker login "${{ env.GLOBAL_REPO_NAME }}" -u "${{ env.DOCKER_USERNAME }}" --password-stdin
- name: Push image to Dockerhub
run: docker push "${{ env.GLOBAL_REPO_NAME }}/${{ env.GLOBAL_IMAGE_NAME }}"
- name: Slack notification
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
trigger-related-workflows:
needs: [publish-image]
runs-on: ubuntu-latest
steps:
- name: Import Secrets
uses: hashicorp/vault-action@v2.3.0
with:
url: ${{ secrets.VAULT_ADDR }}
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }}
caCertificate: ${{ secrets.VAULTCA }}
secrets: |
ci/data/gh-workflows/workflow-dispatch token | WORKFLOW_DISPATCH_TOKEN ;
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: danubetech/danubetech-uni-registrar-web
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-key
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-sov
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-btcr
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-v1
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-ebsi
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-ion
workflow: "Docker latest image" # Docker build
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: decentralized-identity/uni-registrar-driver-did-web
workflow: "Docker latest image" # Docker build
- name: Slack notification
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}