fix: we pray to god

This commit is contained in:
Alpha Nerd 2026-04-05 19:31:49 +02:00
parent 9bf7a6c967
commit ae509ff548
Signed by: alpha-nerd
SSH key fingerprint: SHA256:QkkAgVoYi9TQ0UKPkiKSfnerZy2h4qhi3SVPXJmBN+M
2 changed files with 17 additions and 8 deletions

View file

@ -18,7 +18,7 @@ on:
env: env:
REGISTRY: bitfreedom.net REGISTRY: bitfreedom.net
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
CACHE_IMAGE: ${{ github.repository }}-buildcache CACHE_IMAGE: ${{ github.repository }}-buildcache-semantic
DOCKER_BUILD_SUMMARY: "false" DOCKER_BUILD_SUMMARY: "false"
jobs: jobs:

View file

@ -11,7 +11,6 @@ on:
env: env:
REGISTRY: bitfreedom.net REGISTRY: bitfreedom.net
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
CACHE_IMAGE: ${{ github.repository }}-buildcache
DOCKER_BUILD_SUMMARY: "false" DOCKER_BUILD_SUMMARY: "false"
jobs: jobs:
@ -78,9 +77,9 @@ jobs:
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
push: true push: true
provenance: false provenance: false
tags: ${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:platform-${{ matrix.arch }} tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:platform-${{ matrix.arch }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:buildcache-${{ matrix.arch }} cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.arch }}
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:buildcache-${{ matrix.arch }},mode=min,image-manifest=true,oci-mediatypes=true cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.arch }},mode=min,image-manifest=true,oci-mediatypes=true
merge: merge:
runs-on: docker-amd64 runs-on: docker-amd64
@ -95,7 +94,7 @@ jobs:
- name: Install Docker - name: Install Docker
run: | run: |
apt-get update -qq apt-get update -qq
apt-get install -y -qq docker.io jq apt-get install -y -qq docker.io jq curl
- name: Start Docker daemon - name: Start Docker daemon
run: | run: |
@ -134,5 +133,15 @@ jobs:
run: | run: |
docker buildx imagetools create \ docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:platform-amd64 \ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:platform-amd64 \
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:platform-arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:platform-arm64
- name: Delete intermediate platform tags
run: |
IMAGE_ENCODED=$(echo "${{ env.IMAGE_NAME }}" | sed 's|/|%2F|g')
for tag in platform-amd64 platform-arm64; do
curl -s -X DELETE \
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
"https://${{ env.REGISTRY }}/api/v1/packages/${{ github.repository_owner }}/container/${IMAGE_ENCODED}/${tag}" \
&& echo "Deleted ${tag}" || echo "Failed to delete ${tag} (ignored)"
done