Update WF with parse
This commit is contained in:
@@ -4,8 +4,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
paths-ignore:
|
paths:
|
||||||
- '**/README.md'
|
- Dockerfile
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -19,6 +19,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -31,7 +35,7 @@ jobs:
|
|||||||
- name: Build and Push Docker images for all Container Registries
|
- name: Build and Push Docker images for all Container Registries
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-${{matrix.config.arch}}, ${{ vars.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}}
|
tags: ${{ vars.DOCKERHUB_REPO }}:$VERSION-${{matrix.config.arch}}, ${{ vars.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}}
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
@@ -39,6 +43,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
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
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -48,8 +59,8 @@ jobs:
|
|||||||
- name: Create and push manifest images for pinned
|
- name: Create and push manifest images for pinned
|
||||||
uses: Noelware/docker-manifest-action@v1
|
uses: Noelware/docker-manifest-action@v1
|
||||||
with:
|
with:
|
||||||
inputs: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-arm64,${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-amd64
|
inputs: ${{ vars.DOCKERHUB_REPO }}:$VERSION-arm64,${{ vars.DOCKERHUB_REPO }}:$VERSION-amd64
|
||||||
tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}
|
tags: ${{ vars.DOCKERHUB_REPO }}:$VERSION
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
- name: Create and push manifest images for latest
|
- name: Create and push manifest images for latest
|
||||||
|
Reference in New Issue
Block a user