From 9bf7c40da1d437fe1d4a3505354edecb60c71d52 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 8 Jun 2026 16:27:10 -0400 Subject: [PATCH] fix(ci): replace JS-based actions with shell equivalents for host-mode runner actions/checkout and actions/setup-dotnet are JavaScript actions, and act's host execution mode has a known unfixed path-resolution bug that causes MODULE_NOT_FOUND on their dist/index.js (nektos/act#2024). Replace them with plain git/dotnet shell steps that work against the runner's pre-installed toolchain. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4273c4..5c40a85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,11 +3,17 @@ name: Publish Release # NOTE: This repo lives on a private Gitea instance # (https://www.git.quarantinedstudio.com/mvezina/CinemaTrailers4Jellyfins), not GitHub. # Gitea Actions understands a compatible subset of GitHub Actions syntax, but: -# - GitHub-hosted actions (actions/checkout, actions/setup-dotnet) must be reachable -# from your Gitea runner (directly, via a mirror, or vendored) to be usable as-is. +# - The runner here executes jobs in host mode (no Docker). act's host executor has +# a known unfixed path-resolution bug for JavaScript-based actions (MODULE_NOT_FOUND +# on dist/index.js — see nektos/act#2024), so actions/checkout and +# actions/setup-dotnet are replaced below with plain git/shell equivalents. The +# runner host already has git, dotnet (9.x), zip/unzip and python3+pyyaml installed. # - softprops/action-gh-release talks to the GitHub API and will NOT work against # Gitea — it has been replaced below with direct calls to the Gitea Releases API -# via curl, which needs a GITEA_TOKEN secret (an access token with repo write scope). +# via curl, which needs a GITEA_TOKEN secret. Note: GITEA_TOKEN is a *reserved* name +# that Gitea auto-injects into every job (like GitHub's GITHUB_TOKEN) — you cannot +# and do not need to create it yourself; its permissions come from the `permissions:` +# block below. # Treat this file as a starting template: verify runner/action availability and the # release-API calls against your instance before relying on it. @@ -25,15 +31,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITEA_TOKEN }} - fetch-depth: 0 + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + set -e + REPO_URL="${{ github.server_url }}/${{ github.repository }}.git" + AUTH_HEADER="$(printf 'x-access-token:%s' "$GITEA_TOKEN" | base64 -w0)" + git init -q . + git remote add origin "$REPO_URL" + git config http.extraheader "Authorization: Basic ${AUTH_HEADER}" + git fetch -q origin "${{ github.ref }}" + git checkout -q FETCH_HEAD + git config user.name "gitea-actions" + git config user.email "gitea-actions@quarantinedstudio.com" - - name: Setup .NET 9 - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '9.0.x' + - name: Verify .NET 9 SDK + run: dotnet --version - name: Get version from tag id: version