capture/.woodpecker.yml
Simon Vieille c5392885bd
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline failed
fix ci
2023-06-06 22:12:59 +02:00

43 lines
947 B
YAML

variables:
- &golang "golang:1.19"
- &volumes
- /var/www/html/artifacts/capture/deblan:/artifacts
pipeline:
test:
image: *golang
commands:
- go test -v
build:
image: *golang
volumes: *volumes
commands:
- go build -o /artifacts/capture
push_release:
image: plugins/gitea-release
volumes: *volumes
settings:
api_key:
from_secret: gitnet_api_key
base_url: https://gitnet.fr
note: ${CI_COMMIT_MESSAGE}
files: /artifacts/capture
when:
event: [tag]
docker_build_push:
image: docker:dind
secrets:
- registry_user
- registry_password
commands:
- echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
- "docker build -t deblan/capture:${TAG} ."
- "docker push deblan/capture:${TAG}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: [deployment]