From 6c0e243a8d51873649bf17215024f5fb820412f4 Mon Sep 17 00:00:00 2001 From: David Folkes Date: Mon, 2 Feb 2026 10:29:46 -0500 Subject: [PATCH] Update .github/workflows/build.yml --- .github/workflows/build | 58 --------------------------------- .github/workflows/build.yml | 64 +++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/build create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build b/.github/workflows/build deleted file mode 100644 index dfa3fd2..0000000 --- a/.github/workflows/build +++ /dev/null @@ -1,58 +0,0 @@ -name: Build and Publish TVJ EPG Image - -on: - push: - branches: [ "main" ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Read version - id: version - run: | - VERSION=$(cat VERSION | tr -d ' \n') - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Install Podman - run: | - sudo apt-get update - sudo apt-get install -y podman - - - name: Log in to GitHub Container Registry - run: | - echo "${{ secrets.GHCR_TOKEN }}" | podman login ghcr.io \ - -u ${{ github.actor }} \ - --password-stdin - - - name: Build image with Podman (multi-tag) - run: | - IMAGE=ghcr.io/${{ github.repository }} - VERSION=${{ steps.version.outputs.version }} - SHORT_SHA=${GITHUB_SHA::7} - - podman build \ - -f Containerfile \ - -t $IMAGE:latest \ - -t $IMAGE:v$VERSION \ - -t $IMAGE:sha-$SHORT_SHA \ - . - - - name: Push all tags - run: | - IMAGE=ghcr.io/${{ github.repository }} - VERSION=${{ steps.version.outputs.version }} - SHORT_SHA=${GITHUB_SHA::7} - - podman push $IMAGE:latest - podman push $IMAGE:v$VERSION - podman push $IMAGE:sha-$SHORT_SHA diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a896b57 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,64 @@ +name: Build and Publish TVJ EPG Image + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: gitea/checkout@v4 + + - name: Install Podman + run: | + sudo apt-get update + sudo apt-get install -y podman + + - name: Read version + id: version + run: | + VERSION="$(cat VERSION | tr -d ' \n')" + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Registry login + env: + REGISTRY: ${{ vars.REGISTRY }} + REGISTRY_USER: ${{ secrets.REGISTRY_USER }} + REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + run: | + echo "$REGISTRY_TOKEN" | podman login "$REGISTRY" \ + -u "$REGISTRY_USER" \ + --password-stdin + + - name: Build image (multi-tag) + env: + REGISTRY: ${{ vars.REGISTRY }} + IMAGE: ${{ vars.IMAGE }} + VERSION: ${{ steps.version.outputs.version }} + run: | + SHORT_SHA="${GITHUB_SHA::7}" + FULL_IMAGE="$REGISTRY/$IMAGE" + + podman build \ + -f Containerfile \ + -t "$FULL_IMAGE:latest" \ + -t "$FULL_IMAGE:v$VERSION" \ + -t "$FULL_IMAGE:sha-$SHORT_SHA" \ + . + + - name: Push all tags + env: + REGISTRY: ${{ vars.REGISTRY }} + IMAGE: ${{ vars.IMAGE }} + VERSION: ${{ steps.version.outputs.version }} + run: | + SHORT_SHA="${GITHUB_SHA::7}" + FULL_IMAGE="$REGISTRY/$IMAGE" + + podman push "$FULL_IMAGE:latest" + podman push "$FULL_IMAGE:v$VERSION" + podman push "$FULL_IMAGE:sha-$SHORT_SHA"