Skip to content

Commit

Permalink
Fix the manual run of the bump bot, for specific branch (#3123)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kubevirt-bot and nunnatsa authored Oct 4, 2024
1 parent 6466580 commit 82a79ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release-bumper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:

- id: set_branches
run: |
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)
if [[ ${{ github.event_name }} == "workflow_dispatch" && ${{ github.ref }} != "refs/heads/main" ]]; then
matrix="[{\"branch\": \"${GITHUB_REF#refs/heads/}\"}]"
else
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)
fi
echo "matrix={\"branches\":$(echo $matrix)}" >> $GITHUB_OUTPUT
bump_components_version:
Expand Down

0 comments on commit 82a79ec

Please sign in to comment.