Skip to content

Commit 43ecdc2

Browse files
committed
Use bot account when creating releases via GitHub Actions
As done previously for the API server repo in DependencyTrack/dependency-track@c8abaa3 Signed-off-by: nscuro <[email protected]>
1 parent 2c2f73c commit 43ecdc2

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/ci-publish.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ jobs:
6666
6767
- name: Update Release
6868
env:
69-
# or change it to a custom PAT that should be credited for the release
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
GITHUB_TOKEN: ${{ secrets.BOT_RELEASE_TOKEN }}
7170
run: |-
7271
cat << EOF >> .github/default-release-notes.md
7372
\`\`\`text

.github/workflows/ci-release.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,17 @@ jobs:
3030
cache: 'npm'
3131

3232
- name: Bump version and tag via NodeJS
33-
# if you use a bot-user to create the release in the next step
34-
# then it might be a solid idea to change the git config values below to the bot-user's name + email
3533
run: |-
36-
git config user.name "github-actions[bot]"
37-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
34+
git config user.name "dependencytrack-bot"
35+
git config user.email "106437498+dependencytrack-[email protected]"
3836
3937
npm version ${{ github.event.inputs.version-to-bump }} -m "prepare-release: set version to %s"
4038
4139
git push origin "HEAD:refs/heads/master"
4240
4341
- name: Create GitHub Release
4442
env:
45-
# or change it to a custom PAT that should be credited for the release
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GITHUB_TOKEN: ${{ secrets.BOT_RELEASE_TOKEN }}
4744
GH_OPTS: ""
4845
run: |-
4946
VERSION=`jq -r '.version' package.json`

0 commit comments

Comments
 (0)