Files
mail-autoconfig/.woodpecker/build.yaml
mifi 2834c534e9
Some checks failed
ci/woodpecker/push/build Pipeline failed
Wrong registry name?
2026-02-01 22:39:26 -03:00

37 lines
1.3 KiB
YAML

# Build and Publish Docker image (runs on push to main - deploy manually)
# Secrets required in Woodpecker: gitea_registry_username, gitea_package_token, discord_webhook_url
# Project must be set to "Trusted" in Woodpecker for the Docker build step (privileged).
when:
branch: main
event: push
steps:
- name: Build and Publish Docker Image
image: woodpeckerci/plugin-docker-buildx:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
privileged: true
settings:
repo: git.mifi.dev/mifi-holdings/mail-autoconfig
auto_tag: true
logins:
- registry: git.mifi.dev/v2/
username:
from_secret: gitea_registry_username
password:
from_secret: gitea_package_token
- name: Send Deploy Status Notification
image: curlimages/curl
environment:
DISCORD_WEBHOOK_URL:
from_secret: discord_webhook_url
commands:
- |
EMOJI="💩"
[ "$CI_PIPELINE_STATUS" = "success" ] && EMOJI="🎉"
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish %s %s"}' "$CI_REPO" "$CI_PIPELINE_NUMBER" "$CI_PIPELINE_STATUS" "$EMOJI")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
when:
- status: [ success, failure ]