From 9efb7339749f061a0ce087f67b8ff3d37e0165d8 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Wed, 8 Jul 2026 02:10:33 +0530 Subject: [PATCH] fix(ci): use GITOPS_PAT instead of never-configured GITOPS_PUSH_TOKEN Confirmed via the matrix run: every service's actual docker build and push succeeded, but the GitOps-update step failed on all of them with "GITOPS_PUSH_TOKEN is empty". Checked the repo's configured secrets - GITOPS_PUSH_USERNAME/GITOPS_PUSH_TOKEN were never set; only a leftover GITOPS_GITHUB_USERNAME/GITOPS_GITHUB_TOKEN pair (from before the gitops repo moved to Forgejo) and GITOPS_PAT exist. Confirmed ashwin/nxtgauge-gitops lives on ci.nxtgauge.com matching this workflow's defaults, so GITOPS_PAT is the one meant for this. Co-Authored-By: Claude Sonnet 5 --- .forgejo/workflows/build.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 9d45ac5..6ac6ae7 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -156,15 +156,19 @@ jobs: GITOPS_OWNER: ${{ secrets.GITOPS_OWNER || 'ashwin' }} GITOPS_REPO: ${{ secrets.GITOPS_REPO || 'nxtgauge-gitops' }} GITOPS_BRANCH: ${{ secrets.GITOPS_BRANCH || 'main' }} - GITOPS_PUSH_USERNAME: ${{ secrets.GITOPS_PUSH_USERNAME }} - GITOPS_PUSH_TOKEN: ${{ secrets.GITOPS_PUSH_TOKEN }} + # The gitops repo now lives on Forgejo (ci.nxtgauge.com), not + # GitHub - GITOPS_PUSH_USERNAME/GITOPS_PUSH_TOKEN were never + # actually configured as repo secrets (only the leftover + # GITOPS_GITHUB_* pair and GITOPS_PAT exist). Use GITOPS_PAT, + # which matches the current Forgejo-hosted repo. + GITOPS_PAT: ${{ secrets.GITOPS_PAT }} SHA: ${{ github.sha }} run: | set -euo pipefail - test -n "${GITOPS_PUSH_TOKEN:-}" || { echo "GITOPS_PUSH_TOKEN is empty"; exit 1; } + test -n "${GITOPS_PAT:-}" || { echo "GITOPS_PAT is empty"; exit 1; } service="${{ matrix.service }}" - git clone "https://${GITOPS_PUSH_USERNAME}:${GITOPS_PUSH_TOKEN}@${GITOPS_SERVER}/${GITOPS_OWNER}/${GITOPS_REPO}.git" /tmp/nxtgauge-gitops + git clone "https://forgejo-actions:${GITOPS_PAT}@${GITOPS_SERVER}/${GITOPS_OWNER}/${GITOPS_REPO}.git" /tmp/nxtgauge-gitops cd /tmp/nxtgauge-gitops # Up to 3 of these jobs can be pushing to the same gitops branch at