incr/.woodpecker.yml

29 lines
890 B
YAML
Raw Normal View History

2025-07-13 20:45:23 +02:00
when:
event: tag
2025-07-13 19:30:31 +02:00
steps:
2025-07-13 21:08:51 +02:00
build:
2025-07-13 20:45:23 +02:00
image: docker
2025-07-13 21:08:51 +02:00
environment:
2025-07-13 21:09:25 +02:00
DOCKER_BUILDKIT: "1"
2025-07-13 20:45:23 +02:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2025-07-13 19:59:40 +02:00
commands:
2025-07-13 20:45:23 +02:00
- echo "⚙️ Building Docker image for ${CI_COMMIT_TAG}"
2025-07-13 21:08:51 +02:00
- docker build -f docker/Dockerfile -t codeberg.org/${CI_REPO}:${CI_COMMIT_TAG} .
2025-07-13 20:45:23 +02:00
2025-07-13 21:08:51 +02:00
push:
2025-07-13 20:45:23 +02:00
image: docker
2025-07-13 21:12:20 +02:00
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
2025-07-13 20:45:23 +02:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
2025-07-13 21:12:20 +02:00
- echo "🔐 Logging into codeberg.org as ${REGISTRY_USERNAME}"
- echo "${REGISTRY_PASSWORD}" | docker login codeberg.org -u "${REGISTRY_USERNAME}" --password-stdin
2025-07-13 20:45:23 +02:00
- echo "📤 Pushing image codeberg.org/${CI_REPO}:${CI_COMMIT_TAG}"
- docker push codeberg.org/${CI_REPO}:${CI_COMMIT_TAG}