Skip to content

Commit

Permalink
Update mirror.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
feicong authored Sep 22, 2024
1 parent 1f5b72e commit 08c819d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Save Docker image
run: |
SHA512=$(echo -n "$IMAGE_NAME:$VERSION" | sha512sum | awk '{print $1}')
SHA512=$(echo -n "$IMAGE_NAME:$VERSION-$ARCHITECTURE" | sha512sum | awk '{print $1}')
echo "SHA512=${SHA512}" >> $GITHUB_ENV
docker save $IMAGE_NAME:$VERSION -o ${SHA512}.tar
Expand All @@ -54,6 +54,8 @@ jobs:
curl -L -o meta.json "https://github.com/${{ github.repository }}/releases/download/mirror/meta.json" || echo '[]' > meta.json
- name: Create or update meta.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if jq -e ". | any(.image == \"$IMAGE_NAME\" and .version == \"$VERSION\" and .architecture == \"$ARCHITECTURE\")" meta.json; then
jq --arg image "$IMAGE_NAME" --arg version "$VERSION" --arg sha512 "$SHA512" --arg arch "$ARCHITECTURE" \
Expand Down

0 comments on commit 08c819d

Please sign in to comment.