File tree Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
9
9
steps :
10
+ - name : Generate token
11
+ id : generate_token
12
+ uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
13
+ with :
14
+ app_id : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }}
15
+ private_key : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }}
16
+
10
17
- name : Check out code
11
18
uses : actions/checkout@v3
12
19
13
20
- name : Auto-merge
14
21
run : gh pr merge --auto --merge '${{ github.event.pull_request.html_url }}'
15
22
env :
16
- GITHUB_TOKEN : ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
23
+ GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
Original file line number Diff line number Diff line change @@ -31,11 +31,18 @@ jobs:
31
31
# We only need to build the dist/ folder if the PR relates a production NPM dependency, otherwise we don't expect changes.
32
32
if : needs.fetch-dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' && needs.fetch-dependabot-metadata.outputs.dependency-type == 'direct:production'
33
33
steps :
34
- # Check out using a PAT so any pushed changes will trigger checkruns
34
+ - name : Generate token
35
+ id : generate_token
36
+ uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
37
+ with :
38
+ app_id : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }}
39
+ private_key : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }}
40
+
35
41
- uses : actions/checkout@v3
36
42
with :
37
43
ref : ${{ github.event.pull_request.head.ref }}
38
- token : ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
44
+ # Check out using an app token so any pushed changes will trigger checkruns
45
+ token : ${{ steps.generate_token.outputs.token }}
39
46
40
47
- name : Setup Node.js
41
48
uses : actions/setup-node@v3
Original file line number Diff line number Diff line change @@ -18,11 +18,18 @@ jobs:
18
18
runs-on : ubuntu-latest
19
19
20
20
steps :
21
+ - name : Generate token
22
+ id : generate_token
23
+ uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
24
+ with :
25
+ app_id : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }}
26
+ private_key : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }}
27
+
21
28
- uses : actions/checkout@v3
22
29
with :
23
30
# Ensure we start from main in case the workflow is run from a branch
24
31
ref : " main"
25
- token : ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
32
+ token : ${{ steps.generate_token.outputs.token }}
26
33
27
34
- uses : actions/setup-node@v3 # bin/bump-version needs npm
28
35
with :
66
73
echo "PR created at URL: $PR_URL"
67
74
echo "PR_URL=$PR_URL" >> $GITHUB_ENV
68
75
env :
69
- GH_TOKEN : ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
76
+ GH_TOKEN : ${{ steps.generate_token.outputs.token }}
70
77
71
78
- name : Set summary
72
79
run : |
Original file line number Diff line number Diff line change 28
28
# the road we increase the robustness of this.
29
29
30
30
steps :
31
+ - name : Generate token
32
+ id : generate_token
33
+ uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
34
+ with :
35
+ app_id : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }}
36
+ private_key : ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }}
37
+
31
38
- uses : actions/checkout@v3
32
39
with :
33
- token : ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
40
+ token : ${{ steps.generate_token.outputs.token }}
34
41
35
42
- name : Move the tracking tag
36
43
run : git tag -f v1
You can’t perform that action at this time.
0 commit comments