@@ -52,14 +52,15 @@ jobs:
5252 - name : Combine the manifests of the amd and arm images in a manifest
5353 if : github.ref == 'refs/heads/master'
5454 run : |
55- docker tag openlibrary/olbase:latest openlibrary/olbase:latest-amd64
56- docker push openlibrary/olbase:latest-amd64
55+ # Pull out the digests
56+ AMD64_DIGEST=$(docker manifest inspect openlibrary/olbase:latest | jq -r '.manifests[0].digest')
57+ ARM64_DIGEST=$(docker manifest inspect openlibrary/olbase:latest-arm64 | jq -r '.manifests[0].digest')
5758
5859 docker manifest create openlibrary/olbase:latest \
59- openlibrary/olbase:latest-amd64 \
60- openlibrary/olbase:latest-arm64
61- docker manifest annotate openlibrary/olbase:latest openlibrary/olbase:latest-amd64 --os linux --arch amd64
62- docker manifest annotate openlibrary/olbase:latest openlibrary/olbase:latest-arm64 --os linux --arch arm64
60+ openlibrary/olbase:@${AMD64_DIGEST} \
61+ openlibrary/olbase:@${ARM64_DIGEST}
62+ docker manifest annotate openlibrary/olbase:latest openlibrary/olbase:@${AMD64_DIGEST}
63+ docker manifest annotate openlibrary/olbase:latest openlibrary/olbase:@${ARM64_DIGEST}
6364 docker manifest push openlibrary/olbase:latest
6465
6566 # If on another branch, use the branch name -- just the branch name, not the full ref
@@ -86,12 +87,13 @@ jobs:
8687 - name : Test Branch Combine the manifests of the amd and arm images in a manifest
8788 if : github.ref != 'refs/heads/master'
8889 run : |
89- docker tag openlibrary/olbase:${{ github.ref_name }} openlibrary/olbase:${{ github.ref_name }}-amd64
90- docker push openlibrary/olbase:${{ github.ref_name }}-amd64
90+ # Pull out the digests
91+ AMD64_DIGEST=$(docker manifest inspect openlibrary/olbase:${{ github.ref_name }} | jq -r '.manifests[0].digest')
92+ ARM64_DIGEST=$(docker manifest inspect openlibrary/olbase:${{ github.ref_name }}-arm64 | jq -r '.manifests[0].digest')
9193
9294 docker manifest create openlibrary/olbase:${{ github.ref_name }} \
93- openlibrary/olbase:${{ github.ref_name }}-amd64 \
94- openlibrary/olbase:${{ github.ref_name }}-arm64
95- docker manifest annotate openlibrary/olbase:${{ github.ref_name }} openlibrary/olbase:${{ github.ref_name }}-amd64 --os linux --arch amd64
96- docker manifest annotate openlibrary/olbase:${{ github.ref_name }} openlibrary/olbase:${{ github.ref_name }}-arm64 --os linux --arch arm64
95+ openlibrary/olbase:@${AMD64_DIGEST} \
96+ openlibrary/olbase:@${ARM64_DIGEST}
97+ docker manifest annotate openlibrary/olbase:${{ github.ref_name }} openlibrary/olbase:@${AMD64_DIGEST}
98+ docker manifest annotate openlibrary/olbase:${{ github.ref_name }} openlibrary/olbase:@${ARM64_DIGEST}
9799 docker manifest push openlibrary/olbase:${{ github.ref_name }}
0 commit comments