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
Vojtěch Mareš b6a8bb2ab8
ci: add alfheim.vxm.cz to known hosts
Signed-off-by: Vojtěch Mareš <vojtech@mares.cz>
2025-05-15 15:05:49 +02:00

33 lines
848 B
YAML

stages:
- build
- deploy
build:
stage: build
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:bookworm
before_script:
- bash hack/install-xcaddy.sh
script:
- >
xcaddy
build
v2.10.0
--output ./caddy
--with github.com/caddy-dns/cloudflare
artifacts:
paths:
- caddy
deploy:
stage: deploy
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine/ansible:latest
before_script:
- "command -v ssh-agent >/dev/null || ( apk add --no-cache openssh-client )"
- eval $(ssh-agent -s)
- 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
- ssh-keyscan -H alfheim.vxm.cz >> ~/.ssh/known_hosts
script:
- ansible-playbook -i inventory.ini playbook.yml