Skip to content

Commit

Permalink
Better filter the results in second step of 'createchangelog' workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
og-mrk committed Jul 29, 2024
1 parent fb4de0f commit 431533d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/createchangelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# Because there's a chance where this'll get triggered by a Release Creation, Edit, Deletion..
# the value of 'github.ref' will be 'refs/tags/TAG-NAME', and this tag can not be handled easily by
# the 'actions/checkout' action.. we need to handle this case by always changing to main branch.
declare -rA number_of_refname_instances=$(git branch -a | grep -F '${{ github.ref_name }}' | wc --lines)
declare -rA number_of_refname_instances=$(git branch -a | grep -F '${{ github.ref_name }}' | grep -i -v -e 'HEAD\s*detached' | wc --lines)
if [[ $number_of_refname_instances = 0 ]] ; then
echo "branch_name=main" >> $GITHUB_OUTPUT
else
Expand Down

0 comments on commit 431533d

Please sign in to comment.