Skip to content

Commit 08162d0

Browse files
Merge pull request #9815 from rafaeltonholo/ci/add-dependabot-dependency-guard-update-workflow
chore(ci): use thunderbird-botmobile to commit dependency guard updates when dependabot updates a version
2 parents 96a27e0 + 841d669 commit 08162d0

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/dependabot-dependency-guard-update.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@ jobs:
2222
update-dependency-guard:
2323
if: github.actor == 'dependabot[bot]'
2424
runs-on: ubuntu-latest
25+
environment: botmobile
2526
timeout-minutes: 90
2627
steps:
28+
- name: App Token Generate
29+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
30+
if: ${{ vars.BOT_CLIENT_ID }}
31+
id: app-token
32+
with:
33+
app-id: ${{ vars.BOT_CLIENT_ID }}
34+
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
35+
2736
- name: Checkout the repo
2837
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2938
with:
@@ -36,11 +45,12 @@ jobs:
3645
run: ./gradlew dependencyGuardBaseline
3746

3847
- name: Commit and push changes if any
39-
# The email address is composed by {user.id}+{user.login}@users.noreply.github.com
40-
# See https://api.github.com/users/github-actions%5Bbot%5D for more details.
48+
env:
49+
APP_SLUG: ${{ steps.app-token.outputs.app-slug || 'github-actions'}}
50+
APP_USER_ID: ${{ vars.BOT_USER_ID || '41898282' }}
4151
run: |
42-
git config --global user.name "github-actions[bot]"
43-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
52+
git config --global user.name "${APP_SLUG}"
53+
git config --global user.email "${APP_USER_ID}+${APP_SLUG}[bot]@users.noreply.github.com"
4454
git add .
4555
if ! git diff --cached --quiet; then
4656
git commit -m "chore(deps): Update dependency guard files on behalf of @dependabot"

0 commit comments

Comments
 (0)