Skip to content

Commit 6ccfa05

Browse files
committed
build: only build on main brnach with tags
1 parent 7dcc21d commit 6ccfa05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/publish-dockerimage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- '*'
7+
- '[0-9]+.[0-9]+.[0-9]+'
88
branches:
99
- main
1010

@@ -17,14 +17,15 @@ jobs:
1717
contents: read
1818
attestations: write
1919
id-token: write
20+
if: ${{ github.ref == 'refs/heads/main' }}
2021
steps:
2122
- name: Check out the repo
2223
uses: actions/checkout@v4
2324

2425
- name: Extract tag name
2526
id: tag
2627
shell: bash
27-
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
28+
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
2829

2930
- name: Set up QEMU
3031
uses: docker/setup-qemu-action@v2

0 commit comments

Comments
 (0)