incr/.woodpecker.yml

33 lines
983 B
YAML
Raw Normal View History

2025-07-13 19:30:31 +02:00
steps:
build:
image: docker:cli
2025-07-13 19:43:35 +02:00
when:
event: tag
2025-07-13 19:30:31 +02:00
commands:
- docker build -f docker/Dockerfile -t incr:${CI_COMMIT_TAG} .
- docker tag incr:${CI_COMMIT_TAG} incr:latest
volumes:
2025-07-13 19:39:49 +02:00
- /var/run/docker.sock:/var/run/docker.sock
2025-07-13 19:59:40 +02:00
debug-env:
image: alpine
when:
event: tag
commands:
2025-07-13 20:02:19 +02:00
- echo "DEBUG: REGISTRY_USERNAME = $${REGISTRY_USERNAME}"
- echo "DEBUG: REGISTRY_PASSWORD = $${REGISTRY_PASSWORD}"
2025-07-13 19:59:40 +02:00
- env
2025-07-13 19:39:49 +02:00
push:
image: docker:cli
2025-07-13 19:43:35 +02:00
when:
event: tag
2025-07-13 19:39:49 +02:00
commands:
- echo "$${REGISTRY_PASSWORD}" | docker login codeberg.org -u "$${REGISTRY_USERNAME}" --password-stdin
2025-07-13 19:52:50 +02:00
- docker tag incr:${CI_COMMIT_TAG} codeberg.org/lvl0/incr:latest
- docker tag incr:${CI_COMMIT_TAG} codeberg.org/lvl0/incr:${CI_COMMIT_TAG}
- docker push codeberg.org/lvl0/incr:latest
- docker push codeberg.org/lvl0/incr:${CI_COMMIT_TAG}
2025-07-13 19:39:49 +02:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock