Skip to content

Commit 167a1c0

Browse files
committed
ci: trigger workflows on push to release branches
Signed-off-by: CrazyMax <[email protected]>
1 parent b8eb208 commit 167a1c0

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/buildkit.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
push:
1212
branches:
1313
- 'master'
14+
- 'v[0-9]+.[0-9]+'
1415
tags:
1516
- 'v*'
1617
pull_request:
@@ -72,7 +73,9 @@ jobs:
7273
PUSH=push
7374
elif [[ $GITHUB_REF == refs/heads/* ]]; then
7475
TAG=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
75-
PUSH=push
76+
if [ $GITHUB_REF = "refs/heads/${{ github.event.repository.default_branch }}" ]; then
77+
PUSH=push
78+
fi
7679
fi
7780
echo "tag=${TAG}" >>${GITHUB_OUTPUT}
7881
echo "push=${PUSH}" >>${GITHUB_OUTPUT}

.github/workflows/frontend.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
push:
1010
branches:
1111
- 'master'
12+
- 'v[0-9]+.[0-9]+'
1213
tags:
1314
- 'dockerfile/*'
1415
pull_request:
@@ -56,7 +57,9 @@ jobs:
5657
TAG=${GITHUB_REF#refs/tags/}
5758
PUSH=push
5859
elif [[ $GITHUB_REF == refs/heads/* ]]; then
59-
PUSH=push
60+
if [ $GITHUB_REF = "refs/heads/${{ github.event.repository.default_branch }}" ]; then
61+
PUSH=push
62+
fi
6063
fi
6164
echo "typ=${TYP}" >>${GITHUB_OUTPUT}
6265
echo "push=${PUSH}" >>${GITHUB_OUTPUT}

.github/workflows/test-os.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
push:
1212
branches:
1313
- 'master'
14+
- 'v[0-9]+.[0-9]+'
1415
pull_request:
1516
paths-ignore:
1617
- 'README.md'

.github/workflows/validate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
push:
1010
branches:
1111
- 'master'
12+
- 'v[0-9]+.[0-9]+'
1213
tags:
1314
- 'v*'
1415
- 'dockerfile/*'

0 commit comments

Comments
 (0)