diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74d2ab9..5e2b13b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,15 +35,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - 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 up git for pushing run: | git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git - - name: Log git remote and user - run: | - git remote -v - git config --list - git config user.name || true - git config user.email || true - name: Create and push tag for current version (with verbose logging) run: | git tag v${{ steps.get_version.outputs.version }} @@ -61,17 +60,8 @@ 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: Set git user for GitHub Actions bot - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Bump patch version with bumpver run: bumpver update --patch --commit - name: Push version bump commit run: | 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 e39619c..3cfab40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,11 @@ jobs: runs-on: ubuntu-latest needs: approval steps: + - name: Test GH_TOKEN permissions + run: | + curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }} + shell: bash - name: Confirm release tag exists run: | echo "Release tag is ${{ github.ref }}" @@ -54,11 +59,6 @@ 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]" @@ -79,13 +79,14 @@ jobs: with: ref: ${{ github.ref }} fetch-depth: 0 + - 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 up git for pushing run: | git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git - - name: Set git user for GitHub Actions bot - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx