@@ -15,20 +15,27 @@ jobs:
15
15
env :
16
16
HADRON_DISTRIBUTION : compass
17
17
steps :
18
- - uses : actions/checkout@v3
18
+ - name : Create Github App Token
19
+ uses : mongodb-js/devtools-shared/actions/setup-bot-token@main
20
+ id : app-token
21
+ with :
22
+ app-id : ${{ vars.DEVTOOLS_BOT_APP_ID }}
23
+ private-key : ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
24
+
25
+ - uses : actions/checkout@v4
19
26
with :
20
27
# don't checkout a detatched HEAD
21
28
ref : ${{ github.head_ref }}
22
29
23
30
# this is important so git log can pick up on
24
31
# the whole history to generate the list of AUTHORS
25
- fetch-depth : ' 0'
32
+ fetch-depth : " 0"
33
+ token : ${{ steps.app-token.outputs.token }}
26
34
27
-
28
- - uses : actions/setup-node@v3
35
+ - uses : actions/setup-node@v4
29
36
with :
30
37
node-version : 20.16.0
31
- cache : ' npm'
38
+ cache : " npm"
32
39
33
40
34
41
run : |
@@ -40,38 +47,26 @@ jobs:
40
47
npm run bootstrap-ci
41
48
42
49
- name : Update AUTHORS
43
- run : npm run update-authors
50
+ run : |
51
+ npm run update-authors
52
+ git add AUTHORS
44
53
45
54
- name : Update THIRD-PARTY-NOTICES.md
46
- run : npm run update-third-party-notices
55
+ run : |
56
+ npm run update-third-party-notices
57
+ git add THIRD-PARTY-NOTICES.md
47
58
48
59
- name : Update Security Test Summary
49
60
run : |
50
61
npm run update-security-test-summary
62
+ git add docs/security-test-summary.md
51
63
52
64
- name : Update tracking-plan.md
53
- run : npm run update-tracking-plan
54
-
55
- - name : Create Pull Request
56
- id : cpr
57
- uses : peter-evans/create-pull-request@v6
58
- with :
59
- commit-message : Update report
60
- branch : ci/update-3rd-party-notices-and-authors
61
- title : ' chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary'
62
- add-paths : |
63
- THIRD-PARTY-NOTICES.md
64
- AUTHORS
65
- docs/security-test-summary.md
66
- docs/tracking-plan.md
67
- body : |
68
- - Update `AUTHORS`, `THIRD-PARTY-NOTICES`, docs/tracking-plan.md and `docs/security-test-summary.md`
65
+ run : |
66
+ npm run update-tracking-plan
67
+ git add docs/tracking-plan.md
69
68
70
- - name : Merge PR
71
- env :
72
- PULL_REQUEST_NUMBER : ${{steps.cpr.outputs.pull-request-number}}
73
- # NOTE: we don't use a PAT so to not trigger further automation
74
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
+ - name : Commit and push
75
70
run : |
76
- gh pr merge $PULL_REQUEST_NUMBER --squash --delete-branch
77
- gh workflow run codeql.yml -r main
71
+ git commit --no-allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary [skip actions]" || true
72
+ git push
0 commit comments