Update workflow

This commit is contained in:
Max Isom 2024-08-17 23:09:29 -07:00
parent 7f274980b5
commit 62b569d26b
No known key found for this signature in database

View file

@ -43,23 +43,24 @@ jobs:
docker load -i /tmp/images/image-linux-amd64.tar
docker load -i /tmp/images/image-linux-arm64.tar
- name: Download digests
- name: Download SHA
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
path: /tmp/SHA
pattern: sha
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GH_PAT }}
- name: Push images
working-directory: /tmp/digests
run: |
for file in ./*; do
hash=$(basename "$file")
- name: Read the sha.txt file
id: sha_reader
uses: juliangruber/read-file-action@v1.0.0
with:
path: /tmp/SHA/sha/sha.txt
docker push "sha256:$hash"
done
- name: Push images
run: |
docker push ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-amd64
docker push ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-arm64
- name: Download Docker metadata
uses: actions/download-artifact@v4
@ -92,8 +93,7 @@ jobs:
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(cat /tmp/metadata/metadata/metadata.json | jq -cr '.tags | map("-t " + .) | join(" ")') \
$(printf 'sha256:%s ' *)
docker buildx imagetools create $(cat /tmp/metadata/metadata/metadata.json | jq -cr '.tags | map("-t " + .) | join(" ")') ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-amd64 ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-arm64
- name: Create comment
uses: marocchino/sticky-pull-request-comment@v2
@ -103,8 +103,8 @@ jobs:
message: |
#### :package: :robot: A new release has been made for this pull request.
To play around with this PR, pull `${{ env.REGISTRY_IMAGE }}:pr-${{ steps.pull_request_number_reader.outputs.content }}` or `${{ env.REGISTRY_IMAGE }}:${{ github.event.pull_request.head.sha }}`.
To play around with this PR, pull `${{ env.REGISTRY_IMAGE }}:pr-${{ steps.pull_request_number_reader.outputs.content }}`.
Images are available for x86_64 and ARM64.
> Latest commit: ${{ github.event.pull_request.head.sha }}
> Latest commit: ${{ steps.sha_reader.outputs.content }}