From 310f9d675bfb909fe8aecc82f5129d42b47b0ccd Mon Sep 17 00:00:00 2001 From: KC Berg Date: Tue, 8 Jul 2025 19:59:12 -0600 Subject: [PATCH] ci: add curl step to check GH_TOKEN permissions in workflow --- .github/workflows/ci.yml | 7 ++++++- .github/workflows/release.yml | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91e5018..74d2ab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,4 +69,9 @@ jobs: run: bumpver update --patch --commit - name: Push version bump commit run: | - git push \ No newline at end of file + git push + - name: Test GH_TOKEN permissions + run: | + curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }} + shell: bash \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c011bf..e39619c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,6 +54,11 @@ jobs: - name: Set up git for pushing run: | git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git + - name: Test GH_TOKEN permissions + run: | + curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }} + shell: bash - name: Set git user for GitHub Actions bot run: | git config user.name "github-actions[bot]"