2023-07-27 23:26:27 +00:00
|
|
|
steps:
|
|
|
|
lint:
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
|
|
|
- pip install hatch
|
|
|
|
- hatch run lint:run
|
|
|
|
test:
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
|
|
|
- pip install hatch
|
2023-07-28 06:14:10 +00:00
|
|
|
- cp codesmidgen.example.cfg codesmidgen.cfg
|
2023-07-27 23:26:27 +00:00
|
|
|
- hatch run tests:run
|
|
|
|
publish-package:
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
|
|
|
- pip install hatch
|
2023-07-28 05:23:49 +00:00
|
|
|
- hatch build
|
2023-07-27 23:26:27 +00:00
|
|
|
- hatch publish --repo $PIP_REPOSITORY --user $PIP_USERNAME --auth $PIP_TOKEN --no-prompt
|
|
|
|
secrets:
|
|
|
|
- pip_repository
|
|
|
|
- pip_username
|
|
|
|
- pip_token
|
|
|
|
when:
|
|
|
|
event: tag
|
2023-07-29 18:37:40 +00:00
|
|
|
nightly-image:
|
2023-07-29 18:59:29 +00:00
|
|
|
image: docker
|
|
|
|
commands:
|
|
|
|
- docker login git.snyman.info $DOCKER_USERNAME $DOCKER_TOKEN
|
|
|
|
- docker build -t git.snyman.info/codesmidgen:nightly -t git.snyman.info/codesmidgen:${CI_COMMIT_SHA:0:8} .
|
|
|
|
- docker push git.snyman.info/codesmidgen:nightly
|
|
|
|
- docker push git.snyman.info/codesmidgen:${CI_COMMIT_SHA:0:8}
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2023-07-29 18:37:40 +00:00
|
|
|
secrets:
|
|
|
|
- docker_username
|
|
|
|
- docker_token
|
|
|
|
when:
|
|
|
|
- branch: master
|
|
|
|
event: push
|
|
|
|
release-image:
|
2023-07-29 18:59:29 +00:00
|
|
|
image: docker
|
|
|
|
commands:
|
|
|
|
- docker login git.snyman.info $DOCKER_USERNAME $DOCKER_TOKEN
|
|
|
|
- docker build -t git.snyman.info/codesmidgen:latest -t git.snyman.info/codesmidgen:${CI_COMMIT_TAG##v} .
|
|
|
|
- docker push git.snyman.info/codesmidgen:latest
|
|
|
|
- docker push git.snyman.info/codesmidgen:${CI_COMMIT_TAG##v}
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2023-07-28 21:48:56 +00:00
|
|
|
secrets:
|
|
|
|
- docker_username
|
|
|
|
- docker_token
|
|
|
|
when:
|
2023-07-29 18:37:40 +00:00
|
|
|
- branch: master
|
|
|
|
event: tag
|