From 9e8d7546459948289419d851135576b5117ee393 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Fri, 3 Oct 2025 10:06:05 +0530 Subject: [PATCH 1/3] ci: update token usage for pushing changes in CI workflow --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d1581d5..080080e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,6 +37,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + token: ${{ secrets.PAT_TOKEN }} - name: Make script executable run: chmod +x ./generate-cookiecutter-template-from-example-project.sh - name: Generate cookiecutter template @@ -50,4 +51,4 @@ jobs: git config --local user.name "github-actions[bot]" git add . git diff --cached --quiet || git commit -m "ci: update generated cookiecutter template from example" - git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }} HEAD:${{ github.head_ref }} + git push origin ${{ github.head_ref }} From 86733ec33f06f21246edc7982bdc388c36f46707 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Fri, 3 Oct 2025 10:11:46 +0530 Subject: [PATCH 2/3] ci: add test for PAT token with API call in CI workflow --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 080080e..8663972 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,11 @@ jobs: with: ref: ${{ github.head_ref }} token: ${{ secrets.PAT_TOKEN }} + - name: Test PAT with API call + run: | + curl -H "Authorization: token ${{ secrets.PAT_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/user - name: Make script executable run: chmod +x ./generate-cookiecutter-template-from-example-project.sh - name: Generate cookiecutter template From 2d946db051b414476f2e64ca50ebfd2391983abf Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Fri, 3 Oct 2025 10:14:16 +0530 Subject: [PATCH 3/3] ci: remove PAT token test from CI workflow --- .github/workflows/ci.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8663972..080080e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,11 +38,6 @@ jobs: with: ref: ${{ github.head_ref }} token: ${{ secrets.PAT_TOKEN }} - - name: Test PAT with API call - run: | - curl -H "Authorization: token ${{ secrets.PAT_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/user - name: Make script executable run: chmod +x ./generate-cookiecutter-template-from-example-project.sh - name: Generate cookiecutter template