Skip to content

Commit 9a9ce67

Browse files
Jan Fajerskiclaude
andcommitted
fix: use github.token instead of REPOSITORY_PUSH_TOKEN in release workflows
The PR-based catalog workflow does not need a PAT. The built-in github.token is sufficient since the workflows already declare contents: write and pull-requests: write permissions. Remove explicit token: and GH_TOKEN overrides so that actions/checkout uses the default GITHUB_TOKEN (avoiding failures when REPOSITORY_PUSH_TOKEN is unset or stale in forks), and gh pr create picks up GITHUB_TOKEN automatically. Also drop persist-credentials: false from create-github-prerelease which would have broken git push --follow-tags without a separately configured credential. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent f816814 commit 9a9ce67

3 files changed

Lines changed: 0 additions & 11 deletions

File tree

.github/workflows/olm-stable.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
with:
3131
ref: ${{ steps.branch.outputs.name }}
3232
fetch-depth: 0
33-
token: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
3433

3534
- name: Setup Go environment
3635
uses: actions/setup-go@v6
@@ -50,8 +49,6 @@ jobs:
5049
quay_token: ${{ secrets.QUAY_TOKEN }}
5150

5251
- name: Open catalog PR
53-
env:
54-
GH_TOKEN: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
5552
run: |
5653
git config user.name rhobs-release-bot
5754
git config user.email release-bot@monitoring.rhobs.io

.github/workflows/release-branch.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ jobs:
3030
uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0
33-
token: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
34-
persist-credentials: false
3533

3634
# standard-version's release-as relies on controller-gen for code generation.
3735
- name: Setup Go environment
@@ -72,7 +70,6 @@ jobs:
7270
uses: actions/checkout@v6
7371
with:
7472
fetch-depth: 0
75-
token: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
7673

7774
- name: Setup Go environment
7875
uses: actions/setup-go@v6
@@ -99,8 +96,6 @@ jobs:
9996
quay_token: ${{ secrets.QUAY_TOKEN }}
10097

10198
- name: Open catalog PR
102-
env:
103-
GH_TOKEN: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
10499
run: |
105100
git config user.name rhobs-release-bot
106101
git config user.email release-bot@monitoring.rhobs.io

.github/workflows/release.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- uses: actions/checkout@v6
2929
with:
3030
fetch-depth: 0
31-
token: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
3231

3332
# Bumping the version in the next step will also run code generation scripts
3433
# that depend on controller-gen.
@@ -59,8 +58,6 @@ jobs:
5958
quay_token: ${{ secrets.QUAY_TOKEN }}
6059

6160
- name: Open catalog PR
62-
env:
63-
GH_TOKEN: ${{ secrets.REPOSITORY_PUSH_TOKEN || github.token }}
6461
run: |
6562
git config user.name rhobs-release-bot
6663
git config user.email release-bot@monitoring.rhobs.io

0 commit comments

Comments
 (0)