mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-28 17:43:54 -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
|
name: Build Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- released # publishing of stable releases
|
||||||
push:
|
push:
|
||||||
tags:
|
|
||||||
- '*Release*'
|
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
@ -16,16 +17,18 @@ on:
|
||||||
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
|
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
|
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
|
||||||
cancel-in-progress: ${{ github.ref_type != 'tag' }}
|
cancel-in-progress: ${{ github.event_name != 'release' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
name: amd64 & arm64
|
name: amd64 & arm64
|
||||||
|
if: ${{ github.repository_owner == 'Cockatrice' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
@ -52,7 +55,7 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- 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
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue