Compare commits
42 Commits
add-depend
...
97fefbcdb4
| Author | SHA1 | Date | |
|---|---|---|---|
| 97fefbcdb4 | |||
| b4ac64822f | |||
| 593b38fbc0 | |||
| 1eec567df9 | |||
| 80b0396ca7 | |||
| 8a0a66d24e | |||
| 1ac6bad682 | |||
| 02450fcb8a | |||
| 09217762c9 | |||
| a01cc50916 | |||
| 474eb02aa1 | |||
| 8f195f8865 | |||
| b1a614c466 | |||
| 6c351f62d6 | |||
| bac6f8ae7f | |||
| c7a8f02f89 | |||
| f581429737 | |||
| 05a40b422c | |||
| fcbc9dcd0b | |||
| 2a85ea4d3c | |||
| d9cfcf817a | |||
| c522cdd358 | |||
| f8e3779948 | |||
|
|
177609bdc9 | ||
| ed120c5a3f | |||
| f6ca5d3637 | |||
| d1cdcdb085 | |||
| 0425e95206 | |||
| f179718d6a | |||
| 065774e75c | |||
| 95ec1fc8f1 | |||
| 2e66943954 | |||
| cb8e1bac27 | |||
| 136aa610e4 | |||
| 5bdcb5f2ae | |||
| fb9fc91e14 | |||
| f0efe5ccc9 | |||
| 424b3d8c02 | |||
| f199f5f787 | |||
| cd3f8f5b59 | |||
| 0c806ce481 | |||
|
|
aafb4b6716 |
@@ -6,12 +6,7 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
- 'caddy-*/**'
|
- 'caddy-*/**'
|
||||||
- '.github/workflows/**'
|
- '.gitea/workflows/build-and-push.yml'
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
paths:
|
|
||||||
- 'caddy-*/**'
|
|
||||||
- '.github/workflows/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -34,56 +29,69 @@ jobs:
|
|||||||
- name: 'crowdsec'
|
- name: 'crowdsec'
|
||||||
dockerfile: 'caddy-crowdsec/Dockerfile'
|
dockerfile: 'caddy-crowdsec/Dockerfile'
|
||||||
context: 'caddy-crowdsec'
|
context: 'caddy-crowdsec'
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout code
|
name: Checkout code
|
||||||
uses: actions/checkout@v5.0.0
|
uses: actions/checkout@v6.0.2
|
||||||
-
|
-
|
||||||
name: Parse Caddy version
|
name: Parse Caddy version
|
||||||
id: version
|
id: version
|
||||||
run: echo "version=$(grep -oP '(?<=FROM caddy:)[0-9]+\.[0-9]+\.[0-9]+' ${{ matrix.variant.dockerfile }} | head -n 1)" >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
VERSION=$(grep -m 1 -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]' caddy-cloudflare/Dockerfile | cut -d ':' -f2)
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Version from file: $VERSION"
|
||||||
|
|
||||||
|
# Extract semantic version parts
|
||||||
|
MAJOR=$(echo $VERSION | cut -d. -f1)
|
||||||
|
MINOR=$(echo $VERSION | cut -d. -f1-2)
|
||||||
|
|
||||||
|
echo "major_version=$MAJOR" >> $GITHUB_OUTPUT
|
||||||
|
echo "minor_version=$MINOR" >> $GITHUB_OUTPUT
|
||||||
|
echo "Major: $MAJOR, Minor: $MINOR"
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3.6.0
|
uses: docker/setup-qemu-action@v3.7.0
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.11.1
|
uses: docker/setup-buildx-action@v3.12.0
|
||||||
with:
|
with:
|
||||||
driver-opts: image=moby/buildkit:v0.23.2@sha256:ddd1ca44b21eda906e81ab14a3d467fa6c39cd73b9a39df1196210edcb8db59e
|
driver-opts: image=moby/buildkit:v0.23.2@sha256:ddd1ca44b21eda906e81ab14a3d467fa6c39cd73b9a39df1196210edcb8db59e
|
||||||
-
|
-
|
||||||
name: Login to GitHub Container Registry
|
name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3.5.0
|
uses: docker/login-action@v3.7.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ vars.GH_USERNAME }}
|
||||||
password: ${{ secrets.GH_TOKEN }}
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3.5.0
|
uses: docker/login-action@v3.7.0
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Extract metadata (tags, labels) for Docker
|
name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5.8.0
|
uses: docker/metadata-action@v5.10.0
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ github.actor }}/caddy-${{ matrix.variant.name }}
|
ghcr.io/${{ vars.GH_USERNAME }}/caddy-${{ matrix.variant.name }}
|
||||||
${{ vars.DOCKERHUB_USERNAME }}/caddy-${{ matrix.variant.name }}
|
${{ vars.DOCKERHUB_USERNAME }}/caddy-${{ matrix.variant.name }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=${{ steps.version.outputs.version }}
|
|
||||||
type=sha,format=long,prefix=sha-
|
type=sha,format=long,prefix=sha-
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
|
type=raw,value=${{ steps.version.outputs.major_version }}
|
||||||
|
type=raw,value=${{ steps.version.outputs.minor_version }}
|
||||||
|
type=raw,value=${{ steps.version.outputs.version }},priority=1000
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v6.18.0
|
uses: docker/build-push-action@v6.19.2
|
||||||
with:
|
with:
|
||||||
context: ${{ matrix.variant.context }}
|
context: ${{ matrix.variant.context }}
|
||||||
file: ${{ matrix.variant.dockerfile }}
|
file: ${{ matrix.variant.dockerfile }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
78
.gitea/workflows/build-test.yml
Normal file
78
.gitea/workflows/build-test.yml
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: Build Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- 'caddy-*/**'
|
||||||
|
- '.gitea/workflows/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
variant:
|
||||||
|
- name: 'cloudflare'
|
||||||
|
dockerfile: 'caddy-cloudflare/Dockerfile'
|
||||||
|
context: 'caddy-cloudflare'
|
||||||
|
- name: 'crowdsec'
|
||||||
|
dockerfile: 'caddy-crowdsec/Dockerfile'
|
||||||
|
context: 'caddy-crowdsec'
|
||||||
|
fail-fast: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout code
|
||||||
|
uses: actions/checkout@v6.0.2
|
||||||
|
-
|
||||||
|
name: Parse Caddy version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
VERSION=$(grep -m 1 -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]' caddy-cloudflare/Dockerfile | cut -d ':' -f2)
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Version from file: $VERSION"
|
||||||
|
|
||||||
|
# Extract semantic version parts
|
||||||
|
MAJOR=$(echo $VERSION | cut -d. -f1)
|
||||||
|
MINOR=$(echo $VERSION | cut -d. -f1-2)
|
||||||
|
|
||||||
|
echo "major_version=$MAJOR" >> $GITHUB_OUTPUT
|
||||||
|
echo "minor_version=$MINOR" >> $GITHUB_OUTPUT
|
||||||
|
echo "Major: $MAJOR, Minor: $MINOR"
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3.7.0
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.12.0
|
||||||
|
with:
|
||||||
|
driver-opts: image=moby/buildkit:v0.23.2@sha256:ddd1ca44b21eda906e81ab14a3d467fa6c39cd73b9a39df1196210edcb8db59e
|
||||||
|
-
|
||||||
|
name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5.10.0
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/${{ vars.GH_USERNAME }}/caddy-${{ matrix.variant.name }}
|
||||||
|
${{ vars.DOCKERHUB_USERNAME }}/caddy-${{ matrix.variant.name }}
|
||||||
|
tags: |
|
||||||
|
type=sha,format=long,prefix=sha-
|
||||||
|
type=raw,value=latest
|
||||||
|
type=raw,value=${{ steps.version.outputs.major_version }}
|
||||||
|
type=raw,value=${{ steps.version.outputs.minor_version }}
|
||||||
|
type=raw,value=${{ steps.version.outputs.version }},priority=1000
|
||||||
|
-
|
||||||
|
name: Build Test
|
||||||
|
uses: docker/build-push-action@v6.19.2
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.variant.context }}
|
||||||
|
file: ${{ matrix.variant.dockerfile }}
|
||||||
|
push: false
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
build-args: |
|
||||||
|
BUILDKIT_INLINE_CACHE=1
|
||||||
16
.github/dependabot.yml
vendored
16
.github/dependabot.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
# To get started with Dependabot version updates, you'll need to specify which
|
|
||||||
# package ecosystems to update and where the package manifests are located.
|
|
||||||
# Please see the documentation for all configuration options:
|
|
||||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "docker" # See documentation for possible values
|
|
||||||
directory: "/" # Location of package manifests
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
|
||||||
directory: "/" # Location of package manifests
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare \
|
--with github.com/caddy-dns/cloudflare \
|
||||||
@@ -6,6 +6,6 @@ RUN xcaddy build \
|
|||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
||||||
|
|
||||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare \
|
--with github.com/caddy-dns/cloudflare \
|
||||||
@@ -7,6 +7,6 @@ RUN xcaddy build \
|
|||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
||||||
|
|
||||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare \
|
--with github.com/caddy-dns/cloudflare \
|
||||||
--with github.com/mholt/caddy-dynamicdns
|
--with github.com/mholt/caddy-dynamicdns
|
||||||
|
|
||||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare
|
--with github.com/caddy-dns/cloudflare
|
||||||
|
|
||||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/http \
|
--with github.com/hslatman/caddy-crowdsec-bouncer/http \
|
||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
||||||
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
||||||
|
|
||||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
6
renovate.json
Normal file
6
renovate.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user