Skip to content

Commit c03a7d2

Browse files
committed
fix(ci): use permissions instead of PAT for checkout/push
1 parent 0ccd884 commit c03a7d2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/auto-version-bump.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ concurrency:
2323
group: auto-version-bump-${{ github.ref }}
2424
cancel-in-progress: false
2525

26+
permissions:
27+
contents: write
28+
2629
jobs:
2730
version-bump:
2831
# Run on: workflow_dispatch OR (merged PR with rc/stable label, not from bot)
@@ -37,7 +40,6 @@ jobs:
3740
- uses: actions/checkout@v4
3841
with:
3942
fetch-depth: 0
40-
token: ${{ secrets.PAT_TOKEN }}
4143

4244
- name: Determine bump type
4345
id: check
@@ -100,7 +102,7 @@ jobs:
100102
fi
101103
102104
- name: Trigger forge-core pre-release
103-
if: steps.bump.outputs.new_version != ''
105+
if: steps.bump.outputs.new_version != '' && secrets.PAT_TOKEN != ''
104106
uses: peter-evans/repository-dispatch@v2
105107
with:
106108
token: ${{ secrets.PAT_TOKEN }}

0 commit comments

Comments
 (0)