forked from libertytechforce/http2smtp
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
steps:
|
|
lint:
|
|
image: python:3.11
|
|
commands:
|
|
- pip install hatch
|
|
- hatch run lint
|
|
test:
|
|
image: python:3.11
|
|
commands:
|
|
- pip install hatch
|
|
- hatch run test
|
|
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:
|
|
- repo: libertytechforce/http2smtp
|
|
branch: master
|
|
event: tag
|
|
nightly-image:
|
|
image: docker
|
|
commands:
|
|
- "docker login git.libertytechforce.com -u $DOCKER_USERNAME -p $DOCKER_TOKEN"
|
|
- "docker build -t git.libertytechforce.com/libertytechforce/http2smtp:nightly -t git.libertytechforce.com/libertytechforce/http2smtp:${CI_COMMIT_SHA:0:8} -f Dockerfile.nightly ."
|
|
- "docker push git.libertytechforce.com/libertytechforce/http2smtp:nightly"
|
|
- "docker push git.libertytechforce.com/libertytechforce/http2smtp:${CI_COMMIT_SHA:0:8}"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
secrets:
|
|
- docker_username
|
|
- docker_token
|
|
when:
|
|
- repo: libertytechforce/http2smtp
|
|
branch: master
|
|
event: push
|
|
release-image:
|
|
image: docker
|
|
commands:
|
|
- "docker login git.libertytechforce.com -u $DOCKER_USERNAME -p $DOCKER_TOKEN"
|
|
- "docker build -t git.libertytechforce.com/libertytechforce/http2smtp:latest -t git.libertytechforce.com/libertytechforce/http2smtp:${CI_COMMIT_TAG##v} -f Dockerfile.release ."
|
|
- "docker push git.libertytechforce.com/libertytechforce/http2smtp:latest"
|
|
- "docker push git.libertytechforce.com/libertytechforce/http2smtp:${CI_COMMIT_TAG##v}"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
secrets:
|
|
- docker_username
|
|
- docker_token
|
|
when:
|
|
- repo: libertytechforce/http2smtp
|
|
branch: master
|
|
event: tag
|