Update .gitea/workflows/build-and-push.yaml
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4s

This commit is contained in:
2026-05-11 07:51:50 +00:00
parent a8d6610c96
commit 5f20de8d6f

View File

@@ -16,7 +16,19 @@ jobs:
steps:
- name: Install tools
run: |
apk add --no-cache git curl
apk add --no-cache git curl ca-certificates tar gzip
case "$(uname -m)" in
x86_64) CRANE_ARCH="x86_64" ;;
aarch64) CRANE_ARCH="arm64" ;;
*) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
esac
curl -fsSL \
"https://github.com/google/go-containerregistry/releases/download/v0.20.3/go-containerregistry_Linux_${CRANE_ARCH}.tar.gz" \
-o /tmp/go-containerregistry.tar.gz
tar -xzf /tmp/go-containerregistry.tar.gz -C /usr/local/bin crane
crane version
- name: Checkout code
run: |
@@ -76,11 +88,12 @@ jobs:
exit 1
fi
echo "${REGISTRY_TOKEN}" | docker login \
echo "${REGISTRY_TOKEN}" | crane auth login --insecure \
"${{ steps.build.outputs.registry_host }}" \
--username "${REGISTRY_USERNAME}" \
--password-stdin
- name: Push image
run: |
docker push "${{ steps.build.outputs.image }}"
docker save "${{ steps.build.outputs.image }}" -o image.tar
crane push --insecure image.tar "${{ steps.build.outputs.image }}"