From 7ac5342c88da48cdf2a1bd93337573baa24fee6f Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Tue, 10 Mar 2026 12:09:53 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Add=20release=20image=20bui?= =?UTF-8?q?ld=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cd2b0df --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: read + packages: write + +jobs: + docker: + name: Build and Push Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set image name + shell: bash + run: echo "IMAGE_NAME=git.keithsolomon.net/${GITHUB_REPOSITORY_OWNER,,}/NetTrak" >> "$GITHUB_ENV" + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Registry + uses: docker/login-action@v3 + with: + registry: git.keithsolomon.net + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag + type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}