Skip to content

Commit 0bb72ac

Browse files
feat: add branch validation check to prevent execution on non-release branches in cloudbuild.yaml
1 parent 34ed619 commit 0bb72ac

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cloudbuild.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ steps:
2626
- '-c'
2727
- |
2828
set -e
29+
30+
# Only run on release branches
31+
if [[ "$_HEAD_BRANCH" != release-please-* ]]; then
32+
echo "Not a release-please branch. Exiting."
33+
exit 0
34+
fi
35+
echo "Release branch detected. Proceeding with Evalbench..."
2936
3037
# Determine Release Version
3138
if [[ '$_PR_LABELS' =~ 'autorelease: triggered' ]]; then

0 commit comments

Comments
 (0)