Correcting which repo we're building against.

RE:#1952
This commit is contained in:
James Douglass 2025-05-27 13:16:22 -07:00
parent d69cf77efe
commit ada7e6d10c
1 changed files with 8 additions and 1 deletions

View File

@ -56,8 +56,15 @@ jobs:
run: |
# Replace / (invalid tag character) with .
SANITIZED_REF="$(echo ${{github.ref_name}} | sed 's|/|.|g')"
if [[ "${{github.event_name }}" == "pull_request" ]]
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 }}"
else
INVEST_REPO="${{ github.repository }}"
fi
cd docker && docker build \
--build-arg="INVEST_REPO=${{ github.repository }}" \
--build-arg="INVEST_REPO=${INVEST_REPO}" \
--build-arg="INVEST_VERSION=${{ github.sha }}" \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:latest \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${{ github.sha }} \