@@ -740,15 +740,14 @@ jobs:
740
740
uses : docker/setup-qemu-action@v2
741
741
-
742
742
name : Set up Docker Buildx
743
- id : buildx
744
743
uses : docker/setup-buildx-action@v2
745
744
with :
746
745
version : ${{ inputs.buildx-version || env.BUILDX_VERSION }}
747
746
driver-opts : |
748
747
network=host
749
748
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
750
749
-
751
- name : Build and push (1)
750
+ name : Build and push
752
751
id : docker_build
753
752
uses : ./
754
753
with :
@@ -763,54 +762,16 @@ jobs:
763
762
cache-from : type=registry,ref=localhost:5000/name/app
764
763
cache-to : type=inline
765
764
-
766
- name : Inspect (1)
765
+ name : Inspect
767
766
run : |
768
767
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
769
768
-
770
- name : Check digest (1)
769
+ name : Check digest
771
770
run : |
772
771
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
773
772
echo "::error::Digest should not be empty"
774
773
exit 1
775
774
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
814
775
815
776
github-cache :
816
777
runs-on : ubuntu-latest
0 commit comments