Skip to content

Commit 9cf50a0

Browse files
Fix the manual run of the bump bot, for specific branch (#3121)
If running the bump bot on a specific branch, the bot will still run for all the release branches. After this fix, only if running on main, it will run for all branches. This change should be back ported to all the release branches in order to take affect. Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com> Co-authored-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
1 parent f7114d3 commit 9cf50a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release-bumper.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ jobs:
2525

2626
- id: set_branches
2727
run: |
28-
matrix=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -e "origin/main" -e "origin/release-1.[0-9]\+$" | grep -v "release-1\.[0,1,2,3]$" | sed -r 's/origin\/(.*)/{"branch": "\1"}/g' | jq -s)
28+
if [[ ${{ github.event_name }} == "workflow_dispatch" && ${{ github.ref }} != "refs/heads/main" ]]; then
29+
matrix="[{\"branch\": \"${GITHUB_REF#refs/heads/}\"}]"
30+
else
31+
matrix=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -e "origin/main" -e "origin/release-1.[0-9]\+$" | grep -v "release-1\.[0,1,2,3]$" | sed -r 's/origin\/(.*)/{"branch": "\1"}/g' | jq -s)
32+
fi
2933
echo "matrix={\"branches\":$(echo $matrix)}" >> $GITHUB_OUTPUT
3034
3135
bump_components_version:

0 commit comments

Comments
 (0)