ci: allow manual semver image publishing

This commit is contained in:
justme committed 2026-10-02 11:33:34 +08:00
1 parent 65ae850c0c
commit 9964b4e3ad
2 files changed
+8 -3

No files matched your search

+7 -2
View File
@@ -1,6 +1,7 @@
when:
- event: tag
ref: refs/tags/v*
- event: manual
labels:
ci: domain-linux-native
@@ -18,7 +19,9 @@ steps:
release-checks:
image: bash
commands:
- node scripts/check-api-contract.mjs "$CI_COMMIT_TAG"
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
- test -n "$release_tag"
- node scripts/check-api-contract.mjs "$release_tag"
- dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal
publish-backend:
@@ -31,8 +34,10 @@ steps:
ZOT_REGISTRY: zot.oeo.one
commands:
- set -euo pipefail
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
- test -n "$release_tag"
- printf '%s' "$ZOT_PASSWORD" | buildah login "$ZOT_REGISTRY" --username "$ZOT_USERNAME" --password-stdin
- trap 'buildah logout "$ZOT_REGISTRY" >/dev/null 2>&1 || true' EXIT
- image="$ZOT_REGISTRY/justme/webdrop-api:$CI_COMMIT_TAG"
- image="$ZOT_REGISTRY/justme/webdrop-api:$release_tag"
- buildah bud --format docker --platform linux/amd64 --tag "$image" --file server/Dockerfile .
- buildah push "$image" "docker://$image"