Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the upload digest using the new v4 action #175

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- v*.*.*
branches:
- ci/**

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -81,6 +83,7 @@ jobs:
run: |
convco changelog $(git tag --list --sort=version:refname | tail -2 | head -1 )..$(git tag --list --sort=version:refname | tail -1 ) > CHANGELOG.md
- name: Create Github release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: ncipollo/release-action@v1
with:
artifacts: "checksums.txt"
Expand All @@ -93,8 +96,8 @@ jobs:
fail-fast: false
matrix:
recipe:
- { target: aarch64-unknown-linux-gnu, platform: linux/arm64 }
- { target: x86_64-unknown-linux-gnu, platform: linux/amd64 }
- { id: 0, target: aarch64-unknown-linux-gnu, platform: linux/arm64 }
- { id: 1, target: x86_64-unknown-linux-gnu, platform: linux/amd64 }
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -133,7 +136,7 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ matrix.recipe }}
name: digests-${{ matrix.recipe.id }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand Down Expand Up @@ -167,7 +170,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest list and push
if: ${{ startsWith(github.ref, 'refs/tags/') }}
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
- name: Create manifest list and push in dry-run mode
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
working-directory: /tmp/digests
run: |
docker buildx imagetools create --dry-run $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
Loading