Update .gitea/workflows/build.yml
Some checks failed
Build and Publish TVJ EPG Image / build (push) Failing after 0s
Some checks failed
Build and Publish TVJ EPG Image / build (push) Failing after 0s
This commit is contained in:
@@ -10,8 +10,33 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: gitea/checkout@v4
|
||||
- name: Checkout (manual, from loxthelion.com/gitea)
|
||||
env:
|
||||
# If your repo is private, set GITEA_TOKEN as a repo secret (see below).
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Clean workspace
|
||||
rm -rf ./* ./.git || true
|
||||
|
||||
# Build clone URL
|
||||
# GITHUB_SERVER_URL and GITHUB_REPOSITORY are provided by the Actions runtime
|
||||
BASE="${GITHUB_SERVER_URL%/}"
|
||||
REPO="${GITHUB_REPOSITORY}"
|
||||
|
||||
# If private repo, use token auth; otherwise unauthenticated clone works
|
||||
if [ -n "${GITEA_TOKEN:-}" ]; then
|
||||
# Inject token for HTTPS auth
|
||||
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
|
||||
|
||||
# Mark as safe directory for CI environments
|
||||
git config --global --add safe.directory "$PWD"
|
||||
|
||||
- name: Install Podman
|
||||
run: |
|
||||
@@ -24,9 +49,9 @@ jobs:
|
||||
VERSION="$(cat VERSION | tr -d ' \n')"
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Registry login
|
||||
- name: Log in to container registry
|
||||
env:
|
||||
REGISTRY: ${{ vars.REGISTRY }}
|
||||
REGISTRY: ${{ vars.REGISTRY }} # e.g. loxthelion.com:5050 or ghcr.io
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
@@ -37,7 +62,7 @@ jobs:
|
||||
- name: Build image (multi-tag)
|
||||
env:
|
||||
REGISTRY: ${{ vars.REGISTRY }}
|
||||
IMAGE: ${{ vars.IMAGE }}
|
||||
IMAGE: ${{ vars.IMAGE }} # e.g. lyncolnmd/tvj-epg
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
SHORT_SHA="${GITHUB_SHA::7}"
|
||||
|
||||
Reference in New Issue
Block a user