Explicit pull should no longer be needed with BuildKit

This commit is contained in:
BtbN 2021-04-09 06:52:11 +02:00
parent b2e9d1a9ed
commit bc49c2cc2e

View File

@ -35,8 +35,6 @@ jobs:
- name: Image Name - name: Image Name
id: imagename id: imagename
run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base:latest" run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base:latest"
- name: Pull latest
run: docker pull ${{ steps.imagename.outputs.name }} || true
- name: Build base image - name: Build base image
run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} images/base run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} images/base
- name: Push base image - name: Push base image
@ -61,8 +59,6 @@ jobs:
- name: Image Name - name: Image Name
id: imagename id: imagename
run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}:latest" run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}:latest"
- name: Pull latest
run: docker pull ${{ steps.imagename.outputs.name }} || true
- name: Build target base image - name: Build target base image
run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg GH_REPO=${GITHUB_REPOSITORY,,} --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} images/base-${{ matrix.target }} run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg GH_REPO=${GITHUB_REPOSITORY,,} --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} images/base-${{ matrix.target }}
- name: Push target base image - name: Push target base image
@ -92,8 +88,6 @@ jobs:
run: | run: |
IMG="ghcr.io/${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}:latest" IMG="ghcr.io/${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}:latest"
echo "::set-output name=name::${IMG/ /-}" echo "::set-output name=name::${IMG/ /-}"
- name: Pull latest
run: docker pull ${{ steps.imagename.outputs.name }} || true
- name: Build variant image - name: Build variant image
run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} . run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} .
- name: Push variant image - name: Push variant image