Skip to content

Commit 61c5260

Browse files
committed
Add concurrency and master refs to publish workflow
1 parent 9b5a399 commit 61c5260

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build and Publish Container Image
22

3+
concurrency:
4+
group: website-build-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
push:
59
branches: [master]
@@ -39,8 +43,8 @@ jobs:
3943
tags: |
4044
type=sha
4145
type=ref,event=tag
42-
type=ref,event=branch,enable=${{ github.ref == 'refs/heads/main' }}
43-
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
46+
type=ref,event=branch,enable=${{ github.ref == 'refs/heads/master' }}
47+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
4448
4549
- name: Set up Buildx
4650
uses: docker/setup-buildx-action@v3
@@ -74,7 +78,7 @@ jobs:
7478
exit 1
7579
7680
- name: Log in to GHCR
77-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/'))
81+
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/tags/'))
7882
uses: docker/login-action@v3
7983
with:
8084
registry: ${{ env.REGISTRY }}
@@ -83,7 +87,7 @@ jobs:
8387
password: ${{ secrets.CR_PAT != '' && secrets.CR_PAT || secrets.GITHUB_TOKEN }}
8488

8589
- name: Build and push
86-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/'))
90+
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/tags/'))
8791
uses: docker/build-push-action@v6
8892
with:
8993
context: .

0 commit comments

Comments
 (0)