Skip to content

Commit 5bb9736

Browse files
committed
adjust permissions and update add changelog trigger action in update_version.yml
1 parent a1a29e8 commit 5bb9736

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/update_version.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: write
10-
pull-requests: write
9+
contents: read
1110

1211
jobs:
1312
update-version:
1413
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
1517
steps:
1618
- name: Checkout repository
17-
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0 # Fetch all history for git operations
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2020

2121
- name: Get version
2222
id: get_version
@@ -47,6 +47,7 @@ jobs:
4747
else
4848
echo "has_changes=true" >> $GITHUB_OUTPUT
4949
fi
50+
5051
- name: Create PR for version.txt update
5152
if: steps.check_changes.outputs.has_changes == 'true'
5253
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
@@ -61,4 +62,11 @@ jobs:
6162
**Release**: ${{ github.event_name == 'release' && github.event.release.html_url || format('https://github.com/{0}/releases/tag/{1}', github.repository, env.VERSION) }}
6263
**Triggered by**: ${{ github.event_name }}
6364
labels: automation,version-update
64-
delete-branch: true
65+
delete-branch: true
66+
67+
trigger-changelog:
68+
needs: update-version
69+
permissions:
70+
contents: write # create temporary branch to store changelog changes
71+
pull-requests: write # create PR with changelog changes
72+
uses: ./.github/workflows/reusable_publish_changelog.yml

0 commit comments

Comments
 (0)