From 8db8659664dd220c8ca956130ace57928f45a792 Mon Sep 17 00:00:00 2001 From: quotschmacher Date: Thu, 15 Jan 2026 01:07:27 +0100 Subject: [PATCH] Added workflow for image publishing --- .github/workflows/docker-image.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..ce1edf0 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,41 @@ +name: Build and Publish Docker Image + +on: + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout main + uses: actions/checkout@v6 + with: + ref: main + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Resolve short SHA + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.sha_short }}