Skip to content

Commit db0d540

Browse files
committed
👷 fix github env refs
Signed-off-by: Joe Runde <[email protected]>
1 parent a790585 commit db0d540

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

scripts/get_image_tags.sh

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,9 @@ then
1515
tags_to_push+=" ${branch}"
1616
tags_to_push+=" ${branch}.${commit}"
1717
else
18-
# In CI, pull info from TRAVIS_ env vars
19-
# we always have a commit
20-
commit="${TRAVIS_COMMIT:0:7}"
21-
22-
# decide how to reference the build
23-
# If PR build, use the PR number
24-
# If tag build, use the tag
25-
# If branch build, use the branch
26-
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]];
27-
then
28-
# if it is a tag build, TRAVIS_BRANCH will be the tag
29-
build_ref="${TRAVIS_BRANCH}"
30-
else
31-
# TRAVIS_PULL_REQUEST contains the PR number
32-
build_ref="PR-${TRAVIS_PULL_REQUEST}"
33-
fi
18+
# In CI, pull info from github env vars
19+
commit="${GITHUB_SHA:0:7}"
20+
build_ref="${GITHUB_REF_NAME}"
3421

3522
tags_to_push+="${commit}"
3623
tags_to_push+=" ${build_ref}"

0 commit comments

Comments
 (0)