This commit is contained in:
55
.gitea/workflows/build.yaml
Normal file
55
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Build
|
||||||
|
run-name: Build
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Container Registry
|
||||||
|
if: ${{ gitea.event_name != 'pull_request' }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.valverde.cloud
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Parse Caddy version
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' ./Dockerfile | cut -d ':' -f2)" | tee -a $GITEA_OUTPUT
|
||||||
|
|
||||||
|
- name: Generate Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
docker.valverde.cloud/${{ gitea.repository }}
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}},value=v${{ steps.version.outputs.version }}
|
||||||
|
type=semver,pattern={{major}}.{{minor}},value=v${{ steps.version.outputs.version }}
|
||||||
|
type=semver,pattern={{major}},value=v${{ steps.version.outputs.version }}
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=tag
|
||||||
|
type=ref,event=pr
|
||||||
|
type=sha
|
||||||
|
flavor: |
|
||||||
|
latest=true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: ${{ gitea.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM caddy:2.10.2-builder AS builder
|
||||||
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
xcaddy build \
|
||||||
|
--with github.com/greenpau/caddy-security@v1.1.31 \
|
||||||
|
--with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec@v0.9.2 \
|
||||||
|
--with github.com/caddy-dns/namecheap@master
|
||||||
|
|
||||||
|
FROM caddy:2.10.2
|
||||||
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
18
renovate.json
Normal file
18
renovate.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": ["config:recommended"],
|
||||||
|
"dependencyDashboard": true,
|
||||||
|
"dependencyDashboardTitle": "Renovate Dashboard",
|
||||||
|
"assignees": ["thilawyn"],
|
||||||
|
"labels": ["renovate"],
|
||||||
|
"configMigration": true,
|
||||||
|
"prHourlyLimit": 0,
|
||||||
|
"docker-compose": {
|
||||||
|
"hostRules": [
|
||||||
|
{
|
||||||
|
"matchHost": "docker.io",
|
||||||
|
"concurrentRequestLimit": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user