Skip to content

Commit b44cd69

Browse files
refactor: reusable docker
1 parent f4feef5 commit b44cd69

File tree

2 files changed

+40
-7
lines changed

2 files changed

+40
-7
lines changed

.github/workflows/pr-test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ jobs:
6060
dry-run: true
6161

6262
docker-dry-run:
63-
# TODO use tagged version
64-
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-fixes
63+
uses: ./.github/workflows/reusable-docker.yml
6564
with:
66-
image-name: 'iexechub/iexec-sdk'
67-
push: false
68-
hadolint: true
69-
security-scan: true
70-
security-report: comment
65+
dry-run: true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: docker publish
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+
# TODO use tagged version
25+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-fixes
26+
with:
27+
image-name: 'iexechub/iexec-sdk'
28+
registry: 'docker.io'
29+
dockerfile: 'Dockerfile'
30+
context: '.'
31+
security-scan: true
32+
security-report: 'sarif'
33+
hadolint: true
34+
push: ${{ !inputs.dry-run }}
35+
image-tag: ${{ inputs.tag }}
36+
secrets:
37+
username: ${{ secrets.docker-username }}
38+
password: ${{ secrets.docker-password }}

0 commit comments

Comments
 (0)