image: archlinux packages: - docker sources: - https://git.sr.ht/~crocmagnon/blog secrets: - 2da6ddc6-3d12-4306-a1e4-8268c6194386 - 29bc352f-0807-46e9-a4ef-2f869f94afa3 - 5c948915-48c2-4542-8fc1-a5676f4d7126 environment: TESTING: true tasks: - setup_docker: | ./blog/docker/setup-docker - build_and_test: | docker login -u crocmagnon --password-stdin < .docker-secret cd blog docker pull crocmagnon/blog:latest || true docker pull crocmagnon/blog:tests || true docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile . docker build --cache-from crocmagnon/blog:tests -t crocmagnon/blog:tests -f tests.Dockerfile . docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh docker push crocmagnon/blog:latest docker push crocmagnon/blog:tests - deploy: | ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy" triggers: - action: email condition: failure to: Gabriel Augendre