Files
WebDrop/.woodpecker/release-backend.yml
T
2026-10-02 11:08:51 +08:00

39 lines
1.1 KiB
YAML

when:
- event: tag
ref: refs/tags/v*
labels:
ci: domain-linux-native
platform: linux/amd64
clone:
- name: git
image: woodpeckerci/plugin-git:2.9.3
settings:
remote:
from_secret: gitea_clone_webdrop
lfs: false
steps:
release-checks:
image: bash
commands:
- node scripts/check-api-contract.mjs "$CI_COMMIT_TAG"
- dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal
publish-backend:
image: bash
environment:
ZOT_USERNAME:
from_secret: registry_username
ZOT_PASSWORD:
from_secret: registry_password
ZOT_REGISTRY: zot.oeo.one
commands:
- set -euo pipefail
- 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"
- buildah bud --format docker --platform linux/amd64 --tag "$image" --file server/Dockerfile .
- buildah push "$image" "docker://$image"