File tree Expand file tree Collapse file tree 2 files changed +35
-11
lines changed Expand file tree Collapse file tree 2 files changed +35
-11
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,29 @@ jobs:
53
53
runs-on : ubuntu-latest
54
54
needs :
55
55
- validate-tag
56
- permissions :
57
- contents : write
58
- env :
59
- GITHUB_TOKEN : ${{ secrets.RELEASE_GITHUB_TOKEN }}
60
56
steps :
57
+ - name : Get token
58
+ id : get_token
59
+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
60
+ with :
61
+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
62
+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
63
+ permissions : >-
64
+ {
65
+ "contents": "write",
66
+ "pull_requests": "write"
67
+ }
68
+ repositories : >-
69
+ ["apm-agent-java"]
70
+
61
71
- uses : actions/checkout@v4
62
72
with :
63
73
ref : ${{ inputs.ref }}
64
- token : ${{ env.GITHUB_TOKEN }}
74
+ token : ${{ steps.get_token.outputs.token }}
65
75
66
76
- uses : elastic/oblt-actions/git/setup@v1
77
+ with :
78
+ github-token : ${{ steps.get_token.outputs.token }}
67
79
68
80
- name : Create the release tag (post phase)
69
81
if : inputs.phase == 'post'
95
107
- name : Create the ${{ inputs.phase }} release PR
96
108
run : gh pr create --title="${{ inputs.pr_title }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.pr_body }}"
97
109
env :
98
- GH_TOKEN : ${{ env.GITHUB_TOKEN }}
110
+ GH_TOKEN : ${{ steps.get_token.outputs.token }}
Original file line number Diff line number Diff line change @@ -213,17 +213,29 @@ jobs:
213
213
runs-on : ubuntu-latest
214
214
needs :
215
215
- post-release
216
- permissions :
217
- contents : write
218
- env :
219
- GITHUB_TOKEN : ${{ secrets.RELEASE_GITHUB_TOKEN }}
220
216
steps :
217
+ - name : Get token
218
+ id : get_token
219
+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
220
+ with :
221
+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
222
+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
223
+ permissions : >-
224
+ {
225
+ "contents": "write",
226
+ "pull_requests": "write"
227
+ }
228
+ repositories : >-
229
+ ["apm-agent-java"]
230
+
221
231
- uses : actions/checkout@v4
222
232
with :
223
233
ref : ${{ inputs.ref }}
224
- token : ${{ env.GITHUB_TOKEN }}
234
+ token : ${{ steps.get_token.outputs.token }}
225
235
226
236
- uses : elastic/oblt-actions/git/setup@v1
237
+ with :
238
+ github-token : ${{ steps.get_token.outputs.token }}
227
239
228
240
- name : Update major branch
229
241
if : ${{ ! inputs.dry_run }}
You can’t perform that action at this time.
0 commit comments