Skip to content

Commit 528b95f

Browse files
authored
chore: push auto-generated files directly instead of using PRs (#2275)
1 parent 8bf4c46 commit 528b95f

File tree

2 files changed

+13
-27
lines changed

2 files changed

+13
-27
lines changed

.github/workflows/cron-tasks.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
# this is important so git log can pick up on
2222
# the whole history to generate the list of AUTHORS
2323
fetch-depth: "0"
24+
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
2425

2526
- name: Set up Git
2627
run: |
27-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
28-
git config --local user.name "github-actions[bot]"
28+
git config --local user.email "devtoolsbot@users.noreply.github.com"
29+
git config --local user.name "devtoolsbot"
2930
3031
- uses: actions/setup-node@v4
3132
with:
@@ -44,7 +45,7 @@ jobs:
4445
- name: Update THIRD_PARTY_NOTICES.md
4546
run: |
4647
npm run update-third-party-notices
47-
git commit --no-allow-empty -m "chore: update THIRD_PARTY_NOTICES" THIRD_PARTY_NOTICES.md || true
48+
git add THIRD_PARTY_NOTICES.md
4849
4950
- name: Update AUTHORS
5051
run: |
@@ -73,20 +74,7 @@ jobs:
7374
npm run update-cli-usage-text packages/*/*.md *.md
7475
git add packages/*/*.md *.md
7576
76-
- name: Create pull request
77-
id: cpr
78-
uses: peter-evans/create-pull-request@v6
79-
with:
80-
commit-message: Update auto-generated files
81-
branch: ci/cron-tasks-update-files
82-
title: "chore: update auto-generated files"
83-
body: |
84-
- Update auto-generated files
85-
86-
- name: Merge PR
87-
env:
88-
PULL_REQUEST_NUMBER: ${{steps.cpr.outputs.pull-request-number}}
89-
# NOTE: we don't use a PAT so to not trigger further automation
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
- name: Commit and push
9178
run: |
92-
gh pr merge $PULL_REQUEST_NUMBER --squash --delete-branch
79+
git commit --no-allow-empty -m "chore: update auto-generated files" || true
80+
git push

.github/workflows/update-node-js.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
# this is important so git log can pick up on
2020
# the whole history to generate the list of AUTHORS
21-
fetch-depth: '0'
21+
fetch-depth: "0"
2222

2323
- name: Setup git
2424
run: |
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/setup-node@v2
2929
with:
3030
node-version: 16.x
31-
cache: 'npm'
31+
cache: "npm"
3232

3333
- name: Install [email protected]
3434
run: |
@@ -38,16 +38,14 @@ jobs:
3838
run: |
3939
npm run update-node-js-versions
4040
npm run update-evergreen-config
41-
git add .
42-
git commit --no-allow-empty -m "chore: update node.js version" || true
4341
4442
- name: Create Pull Request
4543
id: cpr
46-
uses: peter-evans/create-pull-request@v6
44+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
4745
with:
48-
token: ${{ secrets.GITHUB_TOKEN }}
49-
commit-message: 'chore: update node.js'
46+
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
47+
commit-message: "chore: update node.js version"
5048
branch: ci/update-node-js-versions
51-
title: 'chore: update node.js'
49+
title: "chore: update node.js"
5250
body: |
5351
- Update node.js

0 commit comments

Comments
 (0)