CI: Ensure Docker runs + publishes images only on stable releases (#6839)

* Update docker-release.yml

* Update docker-release.yml

* Update docker-release.yml

* Update docker-release.yml

* Update docker-release.yml
This commit is contained in:
tooomm 2026-04-30 14:30:51 +02:00 committed by GitHub
parent 9ac9a0c73a
commit 5101cc3d74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,10 @@
name: Build Docker Image
on:
release:
types:
- released # publishing of stable releases
push:
tags:
- '*Release*'
branches:
- master
pull_request:
@ -16,16 +17,18 @@ on:
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
cancel-in-progress: ${{ github.ref_type != 'tag' }}
cancel-in-progress: ${{ github.event_name != 'release' }}
jobs:
docker:
name: amd64 & arm64
if: ${{ github.repository_owner == 'Cockatrice' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
@ -52,7 +55,7 @@ jobs:
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
if: github.ref_type == 'tag'
if: contains(github.event.release.tag_name, 'Release') && github.event.release.target_commitish == 'master'
uses: docker/login-action@v4
with:
registry: ghcr.io