Skip to content

Commit

Permalink
push image to github registry (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-korotya authored May 28, 2024
1 parent ec403b5 commit 7223f1e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
run_e2e:
env:
ETHEREUM_CONTRACT_ADDRESS: "0x134B1BE34911E39A8397ec6289782989729807a4"
STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"

runs-on: ubuntu-20.04
steps:
Expand All @@ -19,10 +19,10 @@ jobs:

- name: Build file with supported networks
run: |
echo -e "polygon:" > resolvers.settings.yaml
echo -e " mumbai:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.ETHEREUM_CONTRACT_ADDRESS }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_NODE_URL }}" >> resolvers.settings.yaml
echo -e "iden3:" > 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
- name: Docker build driver container
uses: docker/build-push-action@v3
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/push-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish driver-did-iden3
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-iden3
uses: actions/checkout@v3
with:
path: driver-did-iden3

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build file with supported networks
run: |
cd driver-did-iden3
echo -e "iden3:" > 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-iden3 && \
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/iden3/driver-did-iden3:${{ github.ref_name }} \
-t ghcr.io/iden3/driver-did-iden3:latest .
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Driver for the iden3 DID method
## How to run locally:
1. Create file `resolvers.settings.yaml` with resolver settings:
```yaml
polygon:
mumbai:
iden3:
amoy:
contractAddress: "0xf6..."
networkURL: "https://polygon-mumbai..."
networkURL: "https://polygon-amoy..."
```
2. Build docker container:
```bash
Expand Down

0 comments on commit 7223f1e

Please sign in to comment.