feat: Build image in ci, updates reverse proxy settings.
Some checks failed
CI / release (push) Failing after 1m28s
Some checks failed
CI / release (push) Failing after 1m28s
This commit is contained in:
55
.gitea/workflows/ci.yaml
Normal file
55
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request: {}
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
- name: Setup QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Setup docker buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Container Registery
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.housh.dev
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract metadata for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: git.housh.dev/homelab/caddy-rogue-mini
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha
|
||||||
|
type=raw,value=latest
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
@@ -3,5 +3,12 @@ FROM docker.io/library/caddy:2.9.1-builder as builder
|
|||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare
|
--with github.com/caddy-dns/cloudflare
|
||||||
|
|
||||||
|
COPY ./config /etc/caddy
|
||||||
|
RUN /usr/bin/caddy fmt --overwrite /etc/caddy/Caddyfile
|
||||||
|
|
||||||
|
# ==================================================
|
||||||
|
# Run image.
|
||||||
|
# ==================================================
|
||||||
FROM docker.io/library/caddy:2.9.1-alpine
|
FROM docker.io/library/caddy:2.9.1-alpine
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
COPY --from=builder /etc/caddy/Caddyfile /etc/caddy/Caddyfile
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: Dockerfile
|
# dockerfile: Dockerfile
|
||||||
|
image: git.housh.dev/homelab/caddy-rogue-mini:latest
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
acme_dns cloudflare {env.CF_AUTH_TOKEN}
|
acme_dns cloudflare {env.CF_AUTH_TOKEN}
|
||||||
}
|
}
|
||||||
|
|
||||||
*.housh.dev {
|
*.roguemini.housh.dev {
|
||||||
|
|
||||||
@console host console.roguemini.housh.dev
|
@console host console.roguemini.housh.dev
|
||||||
handle @console {
|
handle @console {
|
||||||
|
|||||||
Reference in New Issue
Block a user