fix: replace skopeo with crane (static binary, no apt needed)
Some checks failed
Docker / build (push) Failing after 19m17s

This commit is contained in:
2026-06-29 16:24:32 +02:00
parent 1da5187241
commit 175b2284f1

View File

@@ -71,35 +71,34 @@ jobs:
platforms: linux/amd64,linux/arm64
provenance: false
- name: Install skopeo
- name: Install crane
if: github.event_name != 'pull_request'
run: sudo apt-get install -y skopeo
run: |
CRANE_VER=$(curl -s https://api.github.com/repos/google/go-containerregistry/releases/latest \
| grep '"tag_name"' | cut -d'"' -f4)
curl -sL "https://github.com/google/go-containerregistry/releases/download/${CRANE_VER}/go-containerregistry_Linux_x86_64.tar.gz" \
| tar xz -C /usr/local/bin crane
# Push with skopeo which uses basic auth and works with Gitea's registry.
# Push with crane which handles Gitea's registry auth correctly.
- name: Push standard image
if: github.event_name != 'pull_request'
env:
CREDS: ${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}
TAGS: ${{ steps.meta.outputs.tags }}
run: |
crane auth login ${{ env.REGISTRY }} \
-u ${{ secrets.REGISTRY_USER }} \
-p ${{ secrets.REGISTRY_PASSWORD }}
echo "$TAGS" | while IFS= read -r tag; do
[ -z "$tag" ] && continue
skopeo copy --all \
oci-archive:/tmp/lmr-standard.tar \
docker://$tag \
--dest-creds="$CREDS"
crane push /tmp/lmr-standard.tar "$tag"
done
- name: Push bundled image
if: github.event_name != 'pull_request'
env:
CREDS: ${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}
TAGS: ${{ steps.meta-bundled.outputs.tags }}
run: |
echo "$TAGS" | while IFS= read -r tag; do
[ -z "$tag" ] && continue
skopeo copy --all \
oci-archive:/tmp/lmr-bundled.tar \
docker://$tag \
--dest-creds="$CREDS"
crane push /tmp/lmr-bundled.tar "$tag"
done