From 413f5e2507f05bb979c1ccaa055431465d3266c5 Mon Sep 17 00:00:00 2001 From: Nebula <40148908+nebula-it@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:36:53 -0800 Subject: [PATCH 1/2] Add GH workflow for publishing images to GHCR --- .github/workflows/docker-publish.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 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..9e155a9 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,41 @@ +name: Build and Publish Container Image + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - 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: Extract metadata (tags, labels) for Container image + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/nodecast-tv + + - name: Build and push Container image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 9aabfc9b43ee5253c6cc9309e0f323fa96397739 Mon Sep 17 00:00:00 2001 From: Nebula <40148908+nebula-it@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:40:05 -0800 Subject: [PATCH 2/2] Add tags like latest, commit SHA and branch by default --- .github/workflows/docker-publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9e155a9..d01a9eb 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -31,6 +31,10 @@ jobs: uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/nodecast-tv + tags: | + type=sha + type=ref,event=branch + type=raw,value=latest - name: Build and push Container image uses: docker/build-push-action@v5