Skip to content

Commit c4aad23

Browse files
ci: build subgraph deployer image
1 parent dfa669c commit c4aad23

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: docker workflow for dataprotector 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/dataprotector-subgraph-deployer'
27+
registry: 'docker.io'
28+
dockerfile: 'deployer.Dockerfile'
29+
context: 'packages/subgraph'
30+
security-scan: true
31+
security-report: 'sarif'
32+
hadolint: true
33+
push: ${{ !inputs.dry-run }}
34+
image-tag: ${{ inputs.tag }}
35+
secrets:
36+
username: ${{ secrets.docker-username }}
37+
password: ${{ secrets.docker-password }}

.github/workflows/subgraph-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,8 @@ jobs:
5252
- name: Build
5353
working-directory: packages/subgraph
5454
run: npm run build
55+
56+
deployer-docker-dry-run:
57+
uses: ./.github/workflows/reusable-subgraph-deployer-docker.yml
58+
with:
59+
dry-run: true

packages/subgraph/deployer.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.18
1+
FROM node:20
22

33
RUN mkdir /app
44

0 commit comments

Comments
 (0)