Skip to content

Commit

Permalink
and another attempt to get the sha into the digest path
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Oct 2, 2023
1 parent 6bcba89 commit e032b39
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish_docker_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ jobs:

- name: Export digest
run: |
mkdir -p /tmp/digests/${GITHUB_SHA}
mkdir -p /tmp/digests/${{ github.sha }}
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${GITHUB_SHA}/${digest#sha256:}"
commit_sha="${{ github.sha }}"
touch "/tmp/digests/${commit_sha}/${digest#sha256:}"
- name: Push docker tags ${{ matrix.platform }}
id: push_tags
Expand All @@ -101,7 +102,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: digests
path: /tmp/digests/${GITHUB_SHA}/*
path: /tmp/digests/${{ github.sha }}/*
if-no-files-found: error

merge-images:
Expand All @@ -113,7 +114,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests/${GITHUB_SHA}
path: /tmp/digests/${{ github.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
Expand Down Expand Up @@ -148,7 +149,7 @@ jobs:
- name: Create manifest list and push
if: ${{ github.event_name != 'pull_request' }}
working-directory: /tmp/digests/${GITHUB_SHA}
working-directory: /tmp/digests/${{ github.sha }}
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
Expand Down

0 comments on commit e032b39

Please sign in to comment.