Skip to content

Commit d924dd9

Browse files
ci(copr): Use GITHUB_TOKEN instead of PAT to update release (#4289)
1 parent f22b00d commit d924dd9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/ci-copr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
startsWith(github.repository, 'LizardByte/')
4747
needs:
4848
- call-copr-ci
49+
permissions:
50+
contents: write
4951
runs-on: ubuntu-latest
5052
steps:
5153
- name: Download build artifacts
@@ -68,5 +70,5 @@ jobs:
6870
name: ${{ github.event.release.name }}
6971
prerelease: true
7072
tag: ${{ github.event.release.tag_name }}
71-
token: ${{ secrets.GH_BOT_TOKEN }}
73+
token: ${{ secrets.GITHUB_TOKEN }} # use built-in token to avoid repeating workflow triggers
7274
virustotal_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ jobs:
9595
name: Linux Copr
9696
if: github.event_name != 'push' # releases are handled directly in ci-copr.yml
9797
needs: release-setup
98+
permissions:
99+
contents: write # needed to update releases
98100
uses: ./.github/workflows/ci-copr.yml
99101
secrets:
100102
COPR_BETA_WEBHOOK_TOKEN: ${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}

0 commit comments

Comments
 (0)