From f0be4ce391d356e0ff83dcdeba4f400e89e36924 Mon Sep 17 00:00:00 2001 From: ztimson Date: Thu, 3 Apr 2025 22:06:28 -0400 Subject: [PATCH] Added versions to docker tags --- .github/workflows/build.yaml | 43 +++++++++++++++++++++++++++++++----- Dockerfile | 2 +- README.md | 0 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e93c8be..4f126bd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,10 +5,43 @@ on: push: jobs: + publish: name: Build & Push Dockerfile - uses: ztimson/actions/.github/workflows/docker.yaml@develop - with: - name: ztimson/caddy-labels - repository: ${{github.server_url}}/${{github.repository}}.git - pass: ${{secrets.DEPLOY_TOKEN}} + runs-on: ubuntu-latest + container: node + steps: + - name: Get Version Number + run: echo "VERSION=$(cat Dockerfile | grep "ARG CADDY_VERSION" | grep -Eo '=.+' | grep -Eo '[[:alnum:]\.\/\-]+')" >> $GITHUB_ENV + + - name: Push Version + uses: ztimson/actions/.github/workflows/docker.yaml@develop + with: + name: ztimson/caddy-labels:${{env.VERSION}} + repository: ${{github.server_url}}/${{github.repository}}.git + pass: ${{secrets.DEPLOY_TOKEN}} + + - name: Push Latest + if: github.ref == 'refs/heads/master' + uses: ztimson/actions/.github/workflows/docker.yaml@develop + with: + name: ztimson/caddy-labels:latest + repository: ${{github.server_url}}/${{github.repository}}.git + pass: ${{secrets.DEPLOY_TOKEN}} + + tag: + name: Tag Version + needs: publish + runs-on: ubuntu-latest + container: node + steps: + - name: Clone Repository + uses: ztimson/actions/clone@develop + + - name: Get Version Number + run: echo "VERSION=$(cat Dockerfile | grep "ARG CADDY_VERSION" | grep -Eo '=.+' | grep -Eo '[[:alnum:]\.\/\-]+')" >> $GITHUB_ENV + + - name: Tag Version + uses: ztimson/actions/tag@develop + with: + tag: ${{env.VERSION}} diff --git a/Dockerfile b/Dockerfile index a3f6530..a45a746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG CADDY_VERSION=2.7.6 +ARG CADDY_VERSION=2.9.1 FROM caddy:${CADDY_VERSION}-builder AS builder diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29