Compare commits
1 Commits
97fefbcdb4
...
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 ]
|
||||
paths:
|
||||
- 'caddy-*/**'
|
||||
- '.gitea/workflows/build-and-push.yml'
|
||||
- '.github/workflows/**'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'caddy-*/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -29,69 +34,56 @@ jobs:
|
||||
- name: 'crowdsec'
|
||||
dockerfile: 'caddy-crowdsec/Dockerfile'
|
||||
context: 'caddy-crowdsec'
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout code
|
||||
uses: actions/checkout@v6.0.2
|
||||
uses: actions/checkout@v5.0.0
|
||||
-
|
||||
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"
|
||||
run: echo "version=$(grep -oP '(?<=FROM caddy:)[0-9]+\.[0-9]+\.[0-9]+' ${{ matrix.variant.dockerfile }} | head -n 1)" >> $GITHUB_OUTPUT
|
||||
-
|
||||
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
|
||||
uses: docker/setup-buildx-action@v3.12.0
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
with:
|
||||
driver-opts: image=moby/buildkit:v0.23.2@sha256:ddd1ca44b21eda906e81ab14a3d467fa6c39cd73b9a39df1196210edcb8db59e
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3.7.0
|
||||
uses: docker/login-action@v3.5.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ vars.GH_USERNAME }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3.7.0
|
||||
uses: docker/login-action@v3.5.0
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.10.0
|
||||
uses: docker/metadata-action@v5.8.0
|
||||
with:
|
||||
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 }}
|
||||
tags: |
|
||||
type=raw,value=${{ steps.version.outputs.version }}
|
||||
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 and push
|
||||
uses: docker/build-push-action@v6.19.2
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
with:
|
||||
context: ${{ matrix.variant.context }}
|
||||
file: ${{ matrix.variant.dockerfile }}
|
||||
push: true
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--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/appsec
|
||||
|
||||
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--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/appsec
|
||||
|
||||
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/cloudflare \
|
||||
--with github.com/mholt/caddy-dynamicdns
|
||||
|
||||
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/cloudflare
|
||||
|
||||
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FROM caddy:2.11.2-builder@sha256:d4f984844fc3b867ac88fd814285a38eaaf5b3ecadb9ca1b3b0397182ef60cfe AS builder
|
||||
FROM caddy:2.10.2-builder@sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/hslatman/caddy-crowdsec-bouncer/http \
|
||||
--with github.com/hslatman/caddy-crowdsec-bouncer/layer4 \
|
||||
--with github.com/hslatman/caddy-crowdsec-bouncer/appsec
|
||||
|
||||
FROM caddy:2.11.2@sha256:261437d35b88cc2f8fa1ed337ebb6b6ce2bd5cd61b2a28cdf83cb201db0a853b
|
||||
FROM caddy:2.10.2@sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
|
||||
|
||||
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