Skip to content

Commit 37347b1

Browse files
committed
use GITHUB_HEAD_REF
1 parent d5f2d71 commit 37347b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci-find-smithy-go.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ if [ "$branch" == main ]; then
2323
echo aws-sdk-go-v2 is on branch main, stop
2424
exit 0
2525
fi
26+
27+
# For PR workflows, only the triggering ref is checked out, which in isolation
28+
# is not recognized as a branch by git. Use the specific workflow env instead.
2629
if [ -z "$branch" ]; then
27-
echo current branch is blank?
28-
exit 1
30+
branch=$GITHUB_HEAD_REF
2931
fi
3032

3133
if [ -n "$GIT_PAT" ]; then

0 commit comments

Comments
 (0)