From cc7fd6f855ec5cc99802447eb630c7e6cd431f8d Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 16:09:29 +0100 Subject: [PATCH] restore ${{ secrets.GITHUB_TOKEN }} for FORGEJO_TOKEN source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit switched to ${{ forgejo.token }} based on a guess, but that property does not exist in the forgejo context — the auto-provided token is exposed under the legacy name secrets.GITHUB_TOKEN (a holdover from the upstream Action runner codebase). This is documented empirically by yavsc/.forgejo/workflows/release.yml, which uses this same expression and works. The github-flavoured name now appears in exactly one place: the env block that binds the runtime value to the local FORGEJO_TOKEN. Every other reference in the script uses FORGEJO_TOKEN, and no comment or prose justifies or explains the upstream name. If Forgejo ever exposes the token under a forgejo-flavoured name, this can be revisited; for now this matches what works on this instance. --- .forgejo/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 252ba09..88a4e4f 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -11,8 +11,8 @@ # .deb files as assets. # # Authentication: the runner auto-provides a token scoped to the -# repository. We read it via ${{ forgejo.token }} and store it in -# the local env var FORGEJO_TOKEN for the rest of the script. +# repository. We read it once into the local env var FORGEJO_TOKEN +# and never reference the runtime-level name again. # # Why bash + jq + curl, no third-party actions: the runner's docker # label points at pazof/yavsc-build-env, a Debian image with jq but @@ -223,7 +223,7 @@ jobs: - name: Publier la release Forgejo via l'API REST env: - FORGEJO_TOKEN: "${{ forgejo.token }}" + FORGEJO_TOKEN: "${{ secrets.GITHUB_TOKEN }}" FORGEJO_API_URL: ${{ forgejo.api_url }} FORGEJO_REPOSITORY: ${{ forgejo.repository }} run: |