fix game
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 20s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 20s
This commit is contained in:
32
.github/workflows/deploy.yaml
vendored
32
.github/workflows/deploy.yaml
vendored
@@ -100,13 +100,31 @@ jobs:
|
|||||||
- name: Tag as branch-latest
|
- name: Tag as branch-latest
|
||||||
if: env.NEEDS_BUILD == 'true'
|
if: env.NEEDS_BUILD == 'true'
|
||||||
run: |
|
run: |
|
||||||
skopeo copy \
|
AUTH=$(echo -n "${{ gitea.actor }}:${{ secrets.PACKAGE_TOKEN }}" | base64 -w0)
|
||||||
--src-creds="${{ gitea.actor }}:${{ secrets.PACKAGE_TOKEN }}" \
|
REGISTRY_API="https://${{ env.REGISTRY }}/v2/${{ env.FULL_IMAGE_PATH }}"
|
||||||
--dest-creds="${{ gitea.actor }}:${{ secrets.PACKAGE_TOKEN }}" \
|
|
||||||
--src-tls-verify=false \
|
# Fetch the manifest (try OCI index first, then v2, then v1)
|
||||||
--dest-tls-verify=false \
|
for MEDIA_TYPE in \
|
||||||
"docker://${{ env.REGISTRY }}/${{ env.FULL_IMAGE_PATH }}:${{ env.IMAGE_TAG }}" \
|
"application/vnd.oci.image.index.v1+json" \
|
||||||
"docker://${{ env.REGISTRY }}/${{ env.FULL_IMAGE_PATH }}:${{ env.BRANCH_TAG }}"
|
"application/vnd.docker.distribution.manifest.list.v2+json" \
|
||||||
|
"application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
|
"application/vnd.oci.image.manifest.v1+json"; do
|
||||||
|
MANIFEST=$(curl -sk \
|
||||||
|
-H "Authorization: Basic $AUTH" \
|
||||||
|
-H "Accept: $MEDIA_TYPE" \
|
||||||
|
"${REGISTRY_API}/manifests/${{ env.IMAGE_TAG }}")
|
||||||
|
if echo "$MANIFEST" | grep -q '"mediaType"\|"schemaVersion"\|"manifests"\|"layers"'; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Manifest fetched, pushing as ${{ env.BRANCH_TAG }}..."
|
||||||
|
curl -sk -X PUT \
|
||||||
|
-H "Authorization: Basic $AUTH" \
|
||||||
|
-H "Content-Type: $MEDIA_TYPE" \
|
||||||
|
-d "$MANIFEST" \
|
||||||
|
"${REGISTRY_API}/manifests/${{ env.BRANCH_TAG }}" \
|
||||||
|
-o /dev/null -w "HTTP %{http_code}\n"
|
||||||
|
|
||||||
# 6. Deploy-Image festlegen
|
# 6. Deploy-Image festlegen
|
||||||
# - Build passiert: SHA-Tag verwenden (exakt dieser Stand)
|
# - Build passiert: SHA-Tag verwenden (exakt dieser Stand)
|
||||||
|
|||||||
Reference in New Issue
Block a user