Update workflow

This commit is contained in:
Max Isom 2024-08-18 15:43:55 -07:00
parent 62b569d26b
commit 0978d40e95
No known key found for this signature in database

View file

@ -51,16 +51,15 @@ jobs:
run-id: ${{ github.event.workflow_run.id }} run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GH_PAT }} github-token: ${{ secrets.GH_PAT }}
- name: Read the sha.txt file - name: Read SHA
id: sha_reader shell: bash
uses: juliangruber/read-file-action@v1.0.0 run: |
with: echo "SHA=$(cat /tmp/SHA/sha/sha.txt | tr -d '\n')" >> $GITHUB_ENV
path: /tmp/SHA/sha/sha.txt
- name: Push images - name: Push images
run: | run: |
docker push ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-amd64 docker push ${{ env.REGISTRY_IMAGE }}:${{ env.SHA }}-amd64
docker push ${{ env.REGISTRY_IMAGE }}:${{ steps.sha_reader.outputs.content }}-arm64 docker push ${{ env.REGISTRY_IMAGE }}:${{ env.SHA }}-arm64
- name: Download Docker metadata - name: Download Docker metadata
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@ -93,7 +92,7 @@ jobs:
- name: Create manifest list and push - name: Create manifest list and push
working-directory: /tmp/digests working-directory: /tmp/digests
run: | run: |
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 docker buildx imagetools create $(cat /tmp/metadata/metadata/metadata.json | jq -cr '.tags | map("-t " + .) | join(" ")') ${{ env.REGISTRY_IMAGE }}:${{ env.SHA }}-amd64 ${{ env.REGISTRY_IMAGE }}:${{ env.SHA }}-arm64
- name: Create comment - name: Create comment
uses: marocchino/sticky-pull-request-comment@v2 uses: marocchino/sticky-pull-request-comment@v2
@ -107,4 +106,4 @@ jobs:
Images are available for x86_64 and ARM64. Images are available for x86_64 and ARM64.
> Latest commit: ${{ steps.sha_reader.outputs.content }} > Latest commit: ${{ env.SHA }}