From 58507edfd518ebee78ca2183131978bf9f6ac587 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Tue, 9 Jun 2026 17:48:32 +0900 Subject: [PATCH] workflows: replace github.server_url with vars.URL_TO_GITEA Gitea blocks vars/secrets prefixed with GITEA_ or GITHUB_. Also avoids relying on github.server_url which resolves to github.com rather than the local Gitea instance on this runner. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/publish-songs.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/publish-songs.yml b/.gitea/workflows/publish-songs.yml index b8d4e9e..fb67131 100644 --- a/.gitea/workflows/publish-songs.yml +++ b/.gitea/workflows/publish-songs.yml @@ -30,23 +30,16 @@ jobs: - name: Checkout ncmr-songs env: FAPAT: ${{ secrets.FAPAT }} + URL_TO_GITEA: ${{ vars.URL_TO_GITEA }} run: | - SERVER="${{ github.server_url }}" - PROTO="${SERVER%%://*}" - HOST="${SERVER#*://}" - AUTHED="${PROTO}://mikkeli:${FAPAT}@${HOST}" - git clone "${AUTHED}/mikkeli/ncmr-songs" ncmr-songs + git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/ncmr-songs" ncmr-songs git -C ncmr-songs checkout ${{ inputs.SOURCE_REF }} - name: Checkout auto-wiki env: FAPAT: ${{ secrets.FAPAT }} - run: | - SERVER="${{ github.server_url }}" - PROTO="${SERVER%%://*}" - HOST="${SERVER#*://}" - AUTHED="${PROTO}://mikkeli:${FAPAT}@${HOST}" - git clone "${AUTHED}/mikkeli/novoyuuparosk-auto-wiki" auto-wiki + URL_TO_GITEA: ${{ vars.URL_TO_GITEA }} + run: git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/novoyuuparosk-auto-wiki" auto-wiki - name: Install Python deps run: pip install --no-cache-dir -r auto-wiki/pipelines/songs/requirements.txt @@ -77,7 +70,7 @@ jobs: WIKI_BOT_USER: ${{ secrets.WIKI_BOT_USER }} WIKI_BOT_PASSWORD: ${{ secrets.WIKI_BOT_PASSWORD }} SOURCE_REF: ${{ inputs.SOURCE_REF }} - GITEA_REPO_URL: ${{ github.server_url }}/mikkeli/ncmr-songs + GITEA_REPO_URL: ${{ vars.URL_TO_GITEA }}/mikkeli/ncmr-songs run: | MODE="${{ steps.diff.outputs.mode }}" if [ "$MODE" = "all" ] || [ "${{ inputs.FULL_PUBLISH }}" = "true" ]; then