Using the merge commit during a PR. RE:#1952

This commit is contained in:
James Douglass 2025-05-27 13:22:58 -07:00
parent ada7e6d10c
commit 4644a0f473
1 changed files with 3 additions and 1 deletions

View File

@ -60,12 +60,14 @@ jobs:
then
# If we're in a PR, build the container from the fork's source.
INVEST_REPO="${{ github.event.pull_request.head.repo.full_name }}"
INVEST_VERSION="${{ github.event.pull_request.merge_commit_sha }}"
else
INVEST_REPO="${{ github.repository }}"
INVEST_VERSION="${{ github.sha }}"
fi
cd docker && docker build \
--build-arg="INVEST_REPO=${INVEST_REPO}" \
--build-arg="INVEST_VERSION=${{ github.sha }}" \
--build-arg="INVEST_VERSION=${INVEST_VERSION}" \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:latest \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${{ github.sha }} \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${SANITIZED_REF} \