Skip to content

Commit

Permalink
use GITHUB_HEAD_REF
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws committed Aug 17, 2023
1 parent d5f2d71 commit 37347b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ci-find-smithy-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ if [ "$branch" == main ]; then
echo aws-sdk-go-v2 is on branch main, stop
exit 0
fi

# For PR workflows, only the triggering ref is checked out, which in isolation
# is not recognized as a branch by git. Use the specific workflow env instead.
if [ -z "$branch" ]; then
echo current branch is blank?
exit 1
branch=$GITHUB_HEAD_REF
fi

if [ -n "$GIT_PAT" ]; then
Expand Down

0 comments on commit 37347b1

Please sign in to comment.