From 72533b8f32ceff21d4f8664e21076d7f96bbb290 Mon Sep 17 00:00:00 2001 From: rock Date: Fri, 28 Aug 2026 16:45:26 -0700 Subject: [PATCH] fix: use consistent secret name for git auth in CI workflows --- .gitea/workflows/ci.yaml | 6 +++--- .gitea/workflows/release.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index c9886c9..df6f861 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -17,7 +17,7 @@ jobs: env: GOPRIVATE: forgejo.riotpiao.com GOFLAGS: -mod=readonly - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: # actions/checkout is a Node-based action; golang:1.25 has no node on PATH. - name: install node (required by JS-based actions) @@ -29,9 +29,9 @@ jobs: # GITHUB_TOKEN is auto-injected by Forgejo Actions and has read access to all repos. - name: configure git auth for private module fetch run: | - git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com" + git config --global url."https://oauth2:${GIT_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: cache go modules + build cache uses: actions/cache@v4 diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 35e4e23..88e38c8 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -23,9 +23,9 @@ jobs: - name: configure git auth for private module fetch run: | - git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com" + git config --global url."https://oauth2:${REGISTRY_PAT}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REGISTRY_PAT: ${{ secrets.GITHUB_TOKEN }} # A tag is the public contract for `go get ...@vX.Y.Z` — re-run the full # gate before publishing a release, never trust that main was green.