1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
build-custom-caddy-and-inst.../.gitlab-ci.yml

32 lines
739 B
YAML

stages:
- build
- deploy
build:
stage: build
image: golang:bookworm
before_script:
- bash hack/install-xcaddy.sh
script:
- >
xcaddy
build
--output /build/caddy
--with github.com/caddy-dns/cloudflare
artifacts:
paths:
- /build/caddy
deploy:
stage: deploy
image: alpine/ansible:latest
before_script:
- "command -v ssh-agent >/dev/null || ( apk add --no-cache openssh-client )"
- eval $(ssh-agent -s)
- chmod 400 "$SSH_PRIVATE_KEY"
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -H valhalla.vxm.cz >> ~/.ssh/known_hosts
script:
- ansible-playbook -i inventory.ini playbook.yml