Skip to content

Commit

Permalink
push to docker hub with relese tag (#7)
Browse files Browse the repository at this point in the history
push to docker hub with relese tag
  • Loading branch information
ilya-korotya authored Apr 29, 2024
1 parent 0c8728c commit 852f3a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 25 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
run_e2e:
env:
STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"
STATE_CONTRACT_ADDRESS_MUMBAI: "0x134B1BE34911E39A8397ec6289782989729807a4"

runs-on: ubuntu-20.04
steps:
Expand All @@ -26,26 +25,22 @@ jobs:
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 " mumbai:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MUMBAI }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_MUMBAI_NODE_URL }}" >> resolvers.settings.yaml
- name: Docker build driver container
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
load: true
tags: iden3-did-driver:develop
tags: polygonid-did-driver:develop
cache-from: type=gha
cache-to: type=gha

- name: iden3-did-driver
run: docker run -p 8080:8080 -d --network host --name iden3-did-driver iden3-did-driver:develop
- name: polygonid-did-driver
run: docker run -p 8080:8080 -d --network host --name polygonid-did-driver polygonid-did-driver:develop

- name: logs
run: docker logs iden3-did-driver
run: docker logs polygonid-did-driver

- name: Readiness probe for issuer service
run: >
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/push-container.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Publish driver-did-polygonid
on:
release:
types: [published]
workflow_dispatch:

jobs:
build_driver:
env:
STATE_CONTRACT_ADDRESS_MUMBAI: "0x134B1BE34911E39A8397ec6289782989729807a4"
STATE_CONTRACT_ADDRESS_MAIN: "0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D"
STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"
runs-on: ubuntu-latest
Expand All @@ -28,9 +29,6 @@ jobs:
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 " mumbai:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MUMBAI }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_MUMBAI_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
Expand All @@ -40,13 +38,9 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: build and deploy to DockerHub
env:
GITHUB_REF: ${{github.ref}}
run: |
ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
echo GITHUB_REF - $ref
cd driver-did-polygonid && \
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-t polygonid/driver-did-polygonid:${ref} \
-t polygonid/driver-did-polygonid:${{ github.ref_name }} \
-t polygonid/driver-did-polygonid:latest .
14 changes: 7 additions & 7 deletions tests/e2e/http_nameservice.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "24ebeb02-2f47-46f6-8baa-2e1bf32b7b7f",
"_postman_id": "e7afe041-c9fe-4fd0-93a4-415924a23876",
"name": "Nameservice e2e",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"mumbai\"\n }\n}",
"raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"amoy\"\n }\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -87,7 +87,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"mumbai\"\n }\n}",
"raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"amoy\"\n }\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -227,7 +227,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{resolver_server}}/1.0/gist?chain=polygon&networkid=mumbai",
"raw": "{{resolver_server}}/1.0/gist?chain=polygon&networkid=amoy",
"host": [
"{{resolver_server}}"
],
Expand All @@ -242,7 +242,7 @@
},
{
"key": "networkid",
"value": "mumbai"
"value": "amoy"
}
]
}
Expand Down Expand Up @@ -561,7 +561,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{resolver_server}}/1.0/gist?chain=polygon&networkid=mumbai",
"raw": "{{resolver_server}}/1.0/gist?chain=polygon&networkid=amoy",
"host": [
"{{resolver_server}}"
],
Expand All @@ -576,7 +576,7 @@
},
{
"key": "networkid",
"value": "mumbai"
"value": "amoy"
}
]
}
Expand Down

0 comments on commit 852f3a9

Please sign in to comment.