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
Vojtech Mares 6c23fb4bb9
ci: do not chmod $SSH_PRIVATE_KEY env var
- gitlab ci var is now type env var instead of file
2024-12-30 14:22:57 +01:00

31 lines
692 B
YAML

stages:
- build
- deploy
build:
stage: build
image: golang:bookworm
before_script:
- bash hack/install-xcaddy.sh
script:
- >
xcaddy
build
--output ./caddy
--with github.com/caddy-dns/cloudflare
artifacts:
paths:
- 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)
- 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