Skip to content

Commit

Permalink
feat: use pr comit for image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
3benbox committed Jan 31, 2024
1 parent 0e56e31 commit 670605c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/rust-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ jobs:
# Use the release tag to deploy, if one is available.
BUILD_TAG=$RELEASE_TAG
fi
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "main" ]]; then
# Use PR commit sha on PRs for main
RELEASE_TAG=$(echo ${{ github.event.pull_request.head.sha }} | head -c 12)
BUILD_TAG=$RELEASE_TAG
fi
make SHA="${{ github.SHA }}" SHA_TAG="$SHA_TAG" RELEASE_TAG="$RELEASE_TAG" publish-docker
echo "Build tag:"
echo ${BUILD_TAG}
Expand Down

0 comments on commit 670605c

Please sign in to comment.