Files
Aberwyn/.drone.yml
Elias Jansson b75928e73d
Some checks failed
continuous-integration/drone/push Build is failing
Yaml update
2026-01-27 19:08:51 +01:00

41 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: default
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
steps:
- name: docker-build
image: docker:24
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
GITEA_USERNAME:
from_secret: gitea_username
GITEA_TOKEN:
from_secret: gitea_token
commands:
- export DOCKER_BUILDKIT=1
- docker buildx create --use --driver docker-container || true
- echo "$GITEA_TOKEN" | docker login gitea.zcz.se -u "$GITEA_USERNAME" --password-stdin
- docker buildx build --builder default --tag gitea.zcz.se/tai/aberwyn/aberwyn:latest --tag gitea.zcz.se/tai/aberwyn/aberwyn:${DRONE_COMMIT_SHA:0:7} --cache-from=type=registry,ref=gitea.zcz.se/tai/aberwyn/aberwyn:buildcache --push -f Aberwyn/Dockerfile .
- name: notify-result
image: alpine
when:
status:
- success
- failure
commands:
- apk add --no-cache curl
- |
if [ "$DRONE_BUILD_STATUS" = "success" ]; then
curl -X POST https://ha.zcz.se/api/webhook/aberwyn_update_success
else
curl -X POST https://ha.zcz.se/api/webhook/aberwyn_update_failed
fi