File tree Expand file tree Collapse file tree 2 files changed +34
-11
lines changed Expand file tree Collapse file tree 2 files changed +34
-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
+ ["${{github.repository}}"]
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,28 @@ 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
+ }
227
+ repositories : >-
228
+ ["${{github.repository}}"]
229
+
221
230
- uses : actions/checkout@v4
222
231
with :
223
232
ref : ${{ inputs.ref }}
224
- token : ${{ env.GITHUB_TOKEN }}
233
+ token : ${{ steps.get_token.outputs.token }}
225
234
226
235
- uses : elastic/oblt-actions/git/setup@v1
236
+ with :
237
+ github-token : ${{ steps.get_token.outputs.token }}
227
238
228
239
- name : Update major branch
229
240
if : ${{ ! inputs.dry_run }}
You can’t perform that action at this time.
0 commit comments