Skip to content

Commit 7a7b957

Browse files
committed
refactor: update docker workflow to use reusable subgraph deployer and add dry-run option
1 parent 4ff39a4 commit 7a7b957

File tree

3 files changed

+42
-8
lines changed

3 files changed

+42
-8
lines changed

.github/workflows/docker-push.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ jobs:
2929
3030
build:
3131
needs: compute-tag
32-
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected]
32+
uses: ./.github/workflows/reusable-subgraph-deployer-docker.yml
3333
with:
34-
image-name: 'iexechub/poco-subgraph-deployer'
35-
image-tag: ${{ needs.compute-tag.outputs.computed_tag }}
36-
security-scan: false
37-
hadolint: false
38-
push: true
34+
tag: ${{ needs.compute-tag.outputs.computed_tag }}
3935
secrets:
40-
username: ${{ secrets.DOCKERHUB_USERNAME }}
41-
password: ${{ secrets.DOCKERHUB_PAT }}
36+
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
37+
docker-password: ${{ secrets.DOCKERHUB_PAT }}

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ jobs:
4545

4646
- name: Run integration tests
4747
run: npm run test:e2e
48+
49+
deployer-docker-dry-run:
50+
uses: ./.github/workflows/reusable-subgraph-deployer-docker.yml
51+
with:
52+
dry-run: true
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: docker workflow for Poco subgraph deployer
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
dry-run:
7+
description: 'Run in dry-run mode (the docker image will not be published)'
8+
default: false
9+
type: boolean
10+
tag:
11+
description: 'Tag of Docker Image'
12+
default: 'latest'
13+
type: string
14+
secrets:
15+
docker-username:
16+
description: 'Docker registry username (required unless `dry-run: true`)'
17+
required: false
18+
docker-password:
19+
description: 'Docker registry password or PAT (required unless `dry-run: true`)'
20+
required: false
21+
22+
jobs:
23+
docker-publish:
24+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected]
25+
with:
26+
image-name: 'iexechub/poco-subgraph-deployer'
27+
security-scan: false
28+
hadolint: false
29+
push: ${{ !inputs.dry-run }}
30+
image-tag: ${{ inputs.tag }}
31+
secrets:
32+
username: ${{ secrets.docker-username }}
33+
password: ${{ secrets.docker-password }}

0 commit comments

Comments
 (0)