Skip to content

Commit 746a2d4

Browse files
authored
Refactor Docker workflow to use workflow_call
1 parent c994ba4 commit 746a2d4

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name: Publish Docker image
22

33
on:
4-
workflow_run:
5-
workflows: ["Gradle CI"]
6-
types: [completed]
7-
branches:
8-
- '*'
4+
workflow_call:
5+
inputs:
6+
release_version:
7+
required: true
8+
type: string
99

1010
jobs:
1111
build-and-push:
1212
runs-on: ubuntu-latest
13-
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'release' }}
1413
permissions:
1514
contents: read
1615
packages: write
@@ -33,7 +32,7 @@ jobs:
3332
file: ./Dockerfile
3433
push: true
3534
build-args: |
36-
RELEASE_VERSION=${{ github.event.workflow_run.head_branch }}
35+
RELEASE_VERSION=${{ inputs.release_version }}
3736
tags: |
38-
ghcr.io/apdevteam/modmail:${{ github.event.workflow_run.head_branch }}
37+
ghcr.io/apdevteam/modmail:${{ inputs.release_version }}
3938
ghcr.io/apdevteam/modmail:latest

0 commit comments

Comments
 (0)