From d9a33ff83f5d3352b331021b554929dd7eb83c2b Mon Sep 17 00:00:00 2001 From: Nick Cross Date: Thu, 21 May 2026 16:04:56 +0100 Subject: [PATCH] Fix committing for toc --- .github/workflows/private-toc.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/private-toc.yml b/.github/workflows/private-toc.yml index 093d269..464e357 100644 --- a/.github/workflows/private-toc.yml +++ b/.github/workflows/private-toc.yml @@ -38,8 +38,10 @@ jobs: - name: Commit and push if README changed run: |- git diff - git diff --quiet || (git add README.md && git commit -m "Updated README ToC") - git push + # Construct the authenticated URL + # format: https://@github.com//.git + REMOTE="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" + git diff --quiet || (git add README.md && git commit -m "Updated README ToC" && git push "${REMOTE}") env: # Use the standard GITHUB_TOKEN or a Custom PAT if pushing to other repos GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}