Use GH_REPO build-arg in target-base builds
This commit is contained in:
parent
0e9c6f8e4d
commit
20172ca00a
1 changed files with 3 additions and 3 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -144,6 +144,7 @@ jobs:
|
||||||
IMG="${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}"
|
IMG="${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}"
|
||||||
echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT
|
echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT
|
||||||
echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT
|
echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT
|
||||||
|
echo "gh_repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
||||||
- name: Stop Commands
|
- name: Stop Commands
|
||||||
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
|
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
|
||||||
- name: Build target base image
|
- name: Build target base image
|
||||||
|
@ -155,6 +156,8 @@ jobs:
|
||||||
tags: ${{ steps.imagename.outputs.name }}:latest
|
tags: ${{ steps.imagename.outputs.name }}:latest
|
||||||
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
|
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
|
||||||
cache-from: type=registry,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
|
- name: Cleanup
|
||||||
if: ${{ env.HAVE_CLEANUP_PAT == 'true' }}
|
if: ${{ env.HAVE_CLEANUP_PAT == 'true' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -197,7 +200,6 @@ jobs:
|
||||||
IMG="${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}"
|
IMG="${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}"
|
||||||
echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT
|
echo "name=ghcr.io/${IMG/ /-}" >> $GITHUB_OUTPUT
|
||||||
echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT
|
echo "rawname=${IMG/ /-}" >> $GITHUB_OUTPUT
|
||||||
echo "gh_repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
|
||||||
- name: Stop Commands
|
- name: Stop Commands
|
||||||
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
|
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
|
||||||
- name: Build target base image
|
- name: Build target base image
|
||||||
|
@ -209,8 +211,6 @@ jobs:
|
||||||
tags: ${{ steps.imagename.outputs.name }}:latest
|
tags: ${{ steps.imagename.outputs.name }}:latest
|
||||||
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
|
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
|
||||||
cache-from: type=registry,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
|
- name: Cleanup
|
||||||
if: ${{ env.HAVE_CLEANUP_PAT == 'true' }}
|
if: ${{ env.HAVE_CLEANUP_PAT == 'true' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
Loading…
Reference in a new issue