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
13 changes: 6 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Build and Push Docker Image

on:
push:
branches: [ main ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main ]
workflow_dispatch: {}
release:
# Publishing a release for an existing tag (via the GitHub UI) does not
# emit a push event, so include this trigger to build the image when a
# release goes live.
types: [ published ]

jobs:
docker-build-pr:
Expand All @@ -27,7 +28,7 @@ jobs:
push: false

docker:
if: github.event_name != 'pull_request'
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -52,9 +53,7 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha

- name: Build and push
uses: docker/build-push-action@v6
Expand Down
Loading