Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
branches:
- main
workflow_run:
workflows: [ "Auto Tag with SemVer" ]
types: [ completed ]
workflow_dispatch:

jobs:
Expand All @@ -24,7 +27,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Docker Registry
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:

# Extract the git tag for the checked out commit, or blank string if it does not have one
- name: Get commit tag
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'
run: |
TAG=$(git describe --tags --exact-match || echo "")
echo "LATEST_TAG=$TAG" >> $GITHUB_ENV
Expand All @@ -67,10 +70,10 @@ jobs:
tags: |
type=ref,event=tag
type=raw,value=latest
type=semver,pattern={{version}},value=${{ env.LATEST_TAG }},enable=${{github.event_name == 'workflow_dispatch'}}
type=semver,pattern={{version}},value=${{ env.LATEST_TAG }},enable=${{ env.LATEST_TAG != '' }}

- name: Push cached image to container registry
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_RECORD_UPLOAD: false
Expand Down
Loading