This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/.build.yml

30 lines
1,000 B
YAML

image: archlinux
packages:
- docker
sources:
- https://git.sr.ht/~crocmagnon/blog
secrets:
- 388c4445-d732-440b-8ff5-fc5dfb46f04a
- 29bc352f-0807-46e9-a4ef-2f869f94afa3
- 5c948915-48c2-4542-8fc1-a5676f4d7126
environment:
TESTING: true
BLOG_TESTS: rg.fr-par.scw.cloud/crocmagnon/blog:tests
BLOG_LATEST: rg.fr-par.scw.cloud/crocmagnon/blog:latest
tasks:
- setup_docker: |
./blog/docker/setup-docker
- build_and_test: |
docker login rg.fr-par.scw.cloud/crocmagnon -u nologin --password-stdin < .docker-secret
cd blog
docker pull $BLOG_IMAGE || true
docker build --pull --cache-from $BLOG_LATEST -t $BLOG_LATEST -f Dockerfile .
docker build -t $BLOG_TESTS -f tests.Dockerfile .
docker run --rm -t $BLOG_TESTS /app/docker/runtests.sh
docker push $BLOG_LATEST
- deploy: |
ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
triggers:
- action: email
condition: failure
to: Gabriel Augendre <gabriel@augendre.info>