diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml deleted file mode 100644 index d52c68e..0000000 --- a/.gitea/workflows/test.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Build and Publish TVJ EPG Image - -on: - push: - branches: [ main ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - env: - GITEA_TOKEN: ${{ secrets.TEA_TOKEN }} - run: | - set -euo pipefail - rm -rf ./* ./.git || true - - BASE="${GITHUB_SERVER_URL%/}" - REPO="${GITHUB_REPOSITORY}" - - if [ -n "${GITEA_TOKEN:-}" ]; then - CLONE_URL="${BASE}/${REPO}.git" - CLONE_URL="$(echo "$CLONE_URL" | sed -E 's#^https://#https://oauth2:'"${GITEA_TOKEN}"'@#')" - git clone "$CLONE_URL" . - else - git clone "${BASE}/${REPO}.git" . - fi - - git config --global --add safe.directory "$PWD" - - - name: Read version - id: version - run: | - VERSION="$(cat VERSION | tr -d ' \n')" - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Docker login - env: - REGISTRY: ${{ vars.REGISTRY }} # e.g. loxthelion.com or loxthelion.com:5050 - REGISTRY_USER: ${{ secrets.REGISTRY_USER }} - REGISTRY_TOKEN: ${{ secrets.TEA_TOKEN }} - run: | - echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" \ - -u "$REGISTRY_USER" \ - --password-stdin - - - name: Build image (multi-tag) - shell: bash - env: - REGISTRY: ${{ vars.REGISTRY }} - VERSION: ${{ steps.version.outputs.version }} - run: | - set -euo pipefail - SHORT_SHA="${GITHUB_SHA::7}" - - FULL_IMAGE="$REGISTRY/david/tvj-epg" - - docker build \ - -f Containerfile \ - -t "$FULL_IMAGE:latest" \ - -t "$FULL_IMAGE:v$VERSION" \ - -t "$FULL_IMAGE:sha-$SHORT_SHA" \ - . - - - name: Push all tags - shell: bash - env: - REGISTRY: ${{ vars.REGISTRY }} - VERSION: ${{ steps.version.outputs.version }} - run: | - set -euo pipefail - SHORT_SHA="${GITHUB_SHA::7}" - - FULL_IMAGE="$REGISTRY/david/tvj-epg" - - docker push "$FULL_IMAGE:latest" - docker push "$FULL_IMAGE:v$VERSION" - docker push "$FULL_IMAGE:sha-$SHORT_SHA"