Test3
This commit is contained in:
@@ -4,15 +4,11 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_REPO: ghcr.io/ryuupendragon/caddy-crowdsec
|
DOCKERHUB_REPO: ghcr.io/ryuupendragon/caddy-test
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
config:
|
|
||||||
- {arch: 'arm64'}
|
|
||||||
runs-on: ubuntu-arm64
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -31,40 +27,10 @@ jobs:
|
|||||||
username: ${{ vars.GH_USERNAME }}
|
username: ${{ vars.GH_USERNAME }}
|
||||||
password: ${{ secrets.GH_TOKEN }}
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push Docker images for all Container Registries
|
- name: Build and Push Docker images
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}-${{matrix.config.arch}}, ${{ env.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}}
|
platforms: linux/amd64, linux/arm64
|
||||||
|
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}, ${{ env.DOCKERHUB_REPO }}:latest
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
merge-docker-manifest:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
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]+$' 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: Create and push manifest images for pinned
|
|
||||||
uses: Noelware/docker-manifest-action@v1
|
|
||||||
with:
|
|
||||||
inputs: ${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}-arm64
|
|
||||||
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}
|
|
||||||
push: true
|
|
||||||
|
|
||||||
- name: Create and push manifest images for latest
|
|
||||||
uses: Noelware/docker-manifest-action@v1
|
|
||||||
with:
|
|
||||||
inputs: ${{ env.DOCKERHUB_REPO }}:latest-arm64
|
|
||||||
tags: ${{ env.DOCKERHUB_REPO }}:latest
|
|
||||||
push: true
|
|
||||||
|
Reference in New Issue
Block a user