From 175b2284f154e2d4fd32283ac5b3bcdc295a6453 Mon Sep 17 00:00:00 2001 From: LovroG05 Date: Mon, 29 Jun 2026 16:24:32 +0200 Subject: [PATCH] fix: replace skopeo with crane (static binary, no apt needed) --- .gitea/workflows/docker.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index b73dc7c..454d4a6 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -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