mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
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:
parent
9ac9a0c73a
commit
5101cc3d74
1 changed files with 8 additions and 5 deletions
13
.github/workflows/docker-release.yml
vendored
13
.github/workflows/docker-release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue