From 20172ca00af0bc0e554c203c559a1339da6651d0 Mon Sep 17 00:00:00 2001 From: Chad Kimes <1936066+chkimes@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:01:53 -0400 Subject: [PATCH] Use GH_REPO build-arg in target-base builds --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dec190d..971260b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,6 +144,7 @@ jobs: IMG="${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}" echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT + echo "gh_repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT - name: Stop Commands run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" - name: Build target base image @@ -155,6 +156,8 @@ jobs: tags: ${{ steps.imagename.outputs.name }}:latest cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache + build-args: | + GH_REPO=ghcr.io/${{ steps.imagename.outputs.gh_repo }} - name: Cleanup if: ${{ env.HAVE_CLEANUP_PAT == 'true' }} continue-on-error: true @@ -197,7 +200,6 @@ jobs: IMG="${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}" echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT - echo "gh_repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT - name: Stop Commands run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" - name: Build target base image @@ -209,8 +211,6 @@ jobs: tags: ${{ steps.imagename.outputs.name }}:latest cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache - build-args: | - GH_REPO=ghcr.io/${{ steps.imagename.outputs.gh_repo }} - name: Cleanup if: ${{ env.HAVE_CLEANUP_PAT == 'true' }} continue-on-error: true