Skip to content

Commit 223ed1e

Browse files
committed
ci: fix registry-cache job
Signed-off-by: CrazyMax <[email protected]>
1 parent fdafae7 commit 223ed1e

File tree

1 file changed

+3
-42
lines changed

1 file changed

+3
-42
lines changed

.github/workflows/ci.yml

+3-42
Original file line numberDiff line numberDiff line change
@@ -740,15 +740,14 @@ jobs:
740740
uses: docker/setup-qemu-action@v2
741741
-
742742
name: Set up Docker Buildx
743-
id: buildx
744743
uses: docker/setup-buildx-action@v2
745744
with:
746745
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
747746
driver-opts: |
748747
network=host
749748
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
750749
-
751-
name: Build and push (1)
750+
name: Build and push
752751
id: docker_build
753752
uses: ./
754753
with:
@@ -763,54 +762,16 @@ jobs:
763762
cache-from: type=registry,ref=localhost:5000/name/app
764763
cache-to: type=inline
765764
-
766-
name: Inspect (1)
765+
name: Inspect
767766
run: |
768767
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
769768
-
770-
name: Check digest (1)
769+
name: Check digest
771770
run: |
772771
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
773772
echo "::error::Digest should not be empty"
774773
exit 1
775774
fi
776-
-
777-
name: Prune
778-
run: |
779-
docker buildx prune -a -f --verbose
780-
-
781-
name: Build and push (2)
782-
id: docker_build2
783-
uses: ./
784-
with:
785-
context: ./test
786-
file: ./test/multi.Dockerfile
787-
builder: ${{ steps.buildx.outputs.name }}
788-
platforms: linux/amd64,linux/arm64
789-
push: true
790-
tags: |
791-
localhost:5000/name/app:latest
792-
localhost:5000/name/app:1.0.0
793-
cache-from: type=registry,ref=localhost:5000/name/app
794-
cache-to: type=inline
795-
-
796-
name: Inspect (2)
797-
run: |
798-
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
799-
-
800-
name: Check digest (2)
801-
run: |
802-
if [ -z "${{ steps.docker_build2.outputs.digest }}" ]; then
803-
echo "::error::Digest should not be empty"
804-
exit 1
805-
fi
806-
-
807-
name: Compare digests
808-
run: |
809-
echo Compare "${{ steps.docker_build.outputs.digest }}" with "${{ steps.docker_build2.outputs.digest }}"
810-
if [ "${{ steps.docker_build.outputs.digest }}" != "${{ steps.docker_build2.outputs.digest }}" ]; then
811-
echo "::error::Digests should be identical"
812-
exit 1
813-
fi
814775
815776
github-cache:
816777
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)