Update .gitea/workflows/build-and-push.yaml
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4s
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4s
This commit is contained in:
@@ -16,7 +16,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
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
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
@@ -76,11 +88,12 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${REGISTRY_TOKEN}" | docker login \
|
echo "${REGISTRY_TOKEN}" | crane auth login --insecure \
|
||||||
"${{ steps.build.outputs.registry_host }}" \
|
"${{ steps.build.outputs.registry_host }}" \
|
||||||
--username "${REGISTRY_USERNAME}" \
|
--username "${REGISTRY_USERNAME}" \
|
||||||
--password-stdin
|
--password-stdin
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
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 }}"
|
||||||
Reference in New Issue
Block a user