Skip to content

Commit 443d503

Browse files
authored
Merge pull request #1008 from GoogleChromeLabs/lsc-1771431501.609049
Refactor Github Action per b/485167538
2 parents 263a321 + e640e7a commit 443d503

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
# Change all uppercase to lowercase
3434
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
3535
# Strip git ref prefix from version
36-
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
36+
VERSION=$(echo "${GITHUB_REF}" | sed -e 's,.*/\(.*\),\1,')
3737
# Strip "v" prefix from tag name
38-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
38+
[[ "${GITHUB_REF}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
3939
[ "$VERSION" == "main" ] && VERSION=next
4040
echo IMAGE_ID=$IMAGE_ID
4141
echo VERSION=$VERSION
4242
[ "$VERSION" == "merge" ] && exit 0
43-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && docker tag $IMAGE_NAME $IMAGE_ID:latest && docker push $IMAGE_ID:latest
43+
[[ "${GITHUB_REF}" == "refs/tags/"* ]] && docker tag $IMAGE_NAME $IMAGE_ID:latest && docker push $IMAGE_ID:latest
4444
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
4545
docker push $IMAGE_ID:$VERSION

0 commit comments

Comments
 (0)