47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
repo: [caddy-cloudflare,caddy-cloudflare-crowdsec,caddy-cloudflare-ddns,caddy-cloudflare-ddns-crowdsec,caddy-crowdsec]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Parse Caddy version
|
|
id: version
|
|
run: echo "VERSION=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' caddy-cloudflare/Dockerfile | cut -d ':' -f2)" >> $GITHUB_ENV
|
|
-
|
|
name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
-
|
|
name: Build and Push Docker images for all Container Registries
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
tags: ryuupendragon/${{matrix.repo}}:${{ env.VERSION }}, ryuupendragon/${{matrix.repo}}:latest
|
|
file: ${{matrix.repo}}/Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|