Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c396218805 |
51
.gitea/workflows/docker-publish-crowdsec.yaml
Normal file
51
.gitea/workflows/docker-publish-crowdsec.yaml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: Docker Build and Publish (CrowdSec)
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '30 6 * * SUN'
|
||||||
|
push:
|
||||||
|
branches: [ "crowdsec" ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/README.md'
|
||||||
|
pull_request:
|
||||||
|
branches: [ "crowdsec" ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/README.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-docker-image:
|
||||||
|
name: Build Docker image and publish to Gitea
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Docker buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.sdgarren.com
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
id: build-and-push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
provenance: false
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.sdgarren.com/scott/caddy-hetzner:crowdsec
|
||||||
|
|
||||||
|
- name: Image digest
|
||||||
|
run: echo ${{ steps.build-and-push.outputs.digest }}
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
FROM caddy:builder AS builder
|
FROM caddy:builder AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/hetzner/v2
|
--with github.com/caddy-dns/hetzner/v2 \
|
||||||
|
--with github.com/mholt/caddy-l4 \
|
||||||
|
--with github.com/caddyserver/transform-encoder \
|
||||||
|
--with github.com/hslatman/caddy-crowdsec-bouncer/http@main \
|
||||||
|
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec@main \
|
||||||
|
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4@main
|
||||||
|
|
||||||
FROM caddy:latest
|
FROM caddy:latest
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user