1
0
Fork 0

feat: build caddy

This commit is contained in:
Vojtěch Mareš 2024-12-28 12:02:15 +01:00
parent c4b3ea4303
commit ed1206136d
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
2 changed files with 26 additions and 0 deletions

15
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,15 @@
stages:
- build
- deploy
build:
stage: build
image: gitlab.mareshq.com/lab/dependency_proxy/containers/golang:bookworm
before_script:
- bash hack/install-xcaddy.sh
script:
- >
xcaddy
build
--output /build/caddy
--with github.com/caddy-dns/cloudflare

11
hack/install-xcaddy.sh Normal file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
apt update
apt install -y curl debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
apt update
apt install xcaddy