From 066de08cf77e6a53a3f5ab037e99b0314016f6fd Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 10 Jun 2026 10:35:07 +0200 Subject: [PATCH] ci: publish Docker image to GHCR on push to main Builds and pushes ghcr.io/r0m1k3/xtremflow:latest (+ sha tag) so update managers (Unraid/Watchtower/Portainer) can detect new images instead of relying on a local build context. Co-Authored-By: Claude Fable 5 --- .github/workflows/docker-publish.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..66c5c97 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,39 @@ +name: Docker Publish + +on: + push: + branches: [main] + workflow_dispatch: + +env: + IMAGE_NAME: ghcr.io/r0m1k3/xtremflow + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile + push: true + tags: | + ${{ env.IMAGE_NAME }}:latest + ${{ env.IMAGE_NAME }}:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max