codesmidgen/.woodpecker.yaml
Raoul Snyman 8a355f59a5
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
Fix a image tag
2023-07-29 14:51:54 -07:00

55 lines
1.7 KiB
YAML

steps:
lint:
image: python:3.11
commands:
- pip install hatch
- hatch run lint:run
test:
image: python:3.11
commands:
- pip install hatch
- cp codesmidgen.example.cfg codesmidgen.cfg
- hatch run tests:run
publish-package:
image: python:3.11
commands:
- pip install hatch
- hatch build
- hatch publish --repo $PIP_REPOSITORY --user $PIP_USERNAME --auth $PIP_TOKEN --no-prompt
secrets:
- pip_repository
- pip_username
- pip_token
when:
event: tag
nightly-image:
image: docker
commands:
- "docker login git.snyman.info -u $DOCKER_USERNAME -p $DOCKER_TOKEN"
- "docker build -t git.snyman.info/raoul/codesmidgen:nightly -t git.snyman.info/raoul/codesmidgen:${CI_COMMIT_SHA:0:8} -f Dockerfile.nightly ."
- "docker push git.snyman.info/raoul/codesmidgen:nightly"
- "docker push git.snyman.info/raoul/codesmidgen:${CI_COMMIT_SHA:0:8}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
secrets:
- docker_username
- docker_token
when:
- branch: master
event: push
release-image:
image: docker
commands:
- "docker login git.snyman.info -u $DOCKER_USERNAME -p $DOCKER_TOKEN"
- "docker build -t git.snyman.info/raoul/codesmidgen:latest -t git.snyman.info/raoul/codesmidgen:${CI_COMMIT_TAG##v} -f Dockerfile.release ."
- "docker push git.snyman.info/raoul/codesmidgen:latest"
- "docker push git.snyman.info/raoul/codesmidgen:${CI_COMMIT_TAG##v}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
secrets:
- docker_username
- docker_token
when:
- branch: master
event: tag