-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (41 loc) · 1.71 KB
/
push-container.yaml
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
name: Publish driver-did-polygonid
on:
release:
types: [published]
workflow_dispatch:
jobs:
build_driver:
env:
STATE_CONTRACT_ADDRESS_MAIN: "0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D"
STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"
runs-on: ubuntu-latest
steps:
- name: Checkout driver-did-polygonid
uses: actions/checkout@v3
with:
path: driver-did-polygonid
- name: Login to DockerHub container registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_PASS }}
- name: Build file with supported networks
run: |
cd driver-did-polygonid
echo -e "polygon:" > resolvers.settings.yaml
echo -e " amoy:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_AMOY }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_AMOY_NODE_URL }}" >> resolvers.settings.yaml
echo -e " main:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MAIN }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_MAIN_NODE_URL }}" >> resolvers.settings.yaml
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: build and deploy to DockerHub
run: |
cd driver-did-polygonid && \
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-t polygonid/driver-did-polygonid:${{ github.ref_name }} \
-t polygonid/driver-did-polygonid:latest .