Compare commits
1 Commits
1e8b5c94b5
...
add-depend
| Author | SHA1 | Date | |
|---|---|---|---|
| 02456aaa6f |
@@ -1,78 +0,0 @@
|
|||||||
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
Normal file
16
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# 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"
|
||||||
@@ -6,7 +6,12 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
- 'caddy-*/**'
|
- 'caddy-*/**'
|
||||||
- '.gitea/workflows/build-and-push.yml'
|
- '.github/workflows/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- 'caddy-*/**'
|
||||||
|
- '.github/workflows/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -29,69 +34,56 @@ jobs:
|
|||||||
- name: 'crowdsec'
|
- name: 'crowdsec'
|
||||||
dockerfile: 'caddy-crowdsec/Dockerfile'
|
dockerfile: 'caddy-crowdsec/Dockerfile'
|
||||||
context: 'caddy-crowdsec'
|
context: 'caddy-crowdsec'
|
||||||
fail-fast: true
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout code
|
name: Checkout code
|
||||||
uses: actions/checkout@v6.0.2
|
uses: actions/checkout@v5.0.0
|
||||||
-
|
-
|
||||||
name: Parse Caddy version
|
name: Parse Caddy version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: echo "version=$(grep -oP '(?<=FROM caddy:)[0-9]+\.[0-9]+\.[0-9]+' ${{ matrix.variant.dockerfile }} | head -n 1)" >> $GITHUB_OUTPUT
|
||||||
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.7.0
|
uses: docker/setup-qemu-action@v3.6.0
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.12.0
|
uses: docker/setup-buildx-action@v3.11.1
|
||||||
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.7.0
|
uses: docker/login-action@v3.5.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ vars.GH_USERNAME }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GH_TOKEN }}
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3.7.0
|
uses: docker/login-action@v3.5.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.10.0
|
uses: docker/metadata-action@v5.8.0
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ vars.GH_USERNAME }}/caddy-${{ matrix.variant.name }}
|
ghcr.io/${{ github.actor }}/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.19.2
|
uses: docker/build-push-action@v6.18.0
|
||||||
with:
|
with:
|
||||||
context: ${{ matrix.variant.context }}
|
context: ${{ matrix.variant.context }}
|
||||||
file: ${{ matrix.variant.dockerfile }}
|
file: ${{ matrix.variant.dockerfile }}
|
||||||
push: true
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM caddy:2.11.1-builder@sha256:9780b126deae015b2c262fa9f4f1f951577e1f6a5fe4d88c0573aeb622071b2d AS builder
|
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d 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.11.1@sha256:9068f76202c0a03545036d32bf2d424d3b46c1174f254070f605002a2dbc9657
|
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||||
|
|
||||||
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.11.1-builder@sha256:9780b126deae015b2c262fa9f4f1f951577e1f6a5fe4d88c0573aeb622071b2d AS builder
|
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d 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.11.1@sha256:9068f76202c0a03545036d32bf2d424d3b46c1174f254070f605002a2dbc9657
|
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||||
|
|
||||||
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.11.1-builder@sha256:9780b126deae015b2c262fa9f4f1f951577e1f6a5fe4d88c0573aeb622071b2d AS builder
|
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d 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.11.1@sha256:9068f76202c0a03545036d32bf2d424d3b46c1174f254070f605002a2dbc9657
|
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||||
|
|
||||||
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.11.1-builder@sha256:9780b126deae015b2c262fa9f4f1f951577e1f6a5fe4d88c0573aeb622071b2d AS builder
|
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/caddy-dns/cloudflare
|
--with github.com/caddy-dns/cloudflare
|
||||||
|
|
||||||
FROM caddy:2.11.1@sha256:9068f76202c0a03545036d32bf2d424d3b46c1174f254070f605002a2dbc9657
|
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||||
|
|
||||||
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.11.1-builder@sha256:9780b126deae015b2c262fa9f4f1f951577e1f6a5fe4d88c0573aeb622071b2d AS builder
|
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d 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.11.1@sha256:9068f76202c0a03545036d32bf2d424d3b46c1174f254070f605002a2dbc9657
|
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"config:recommended"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user