Skip to content

Commit 68e5231

Browse files
author
LE SAULNIER Kevin
committed
fix: use PAT instead
Signed-off-by: LE SAULNIER Kevin <[email protected]>
1 parent d3153c3 commit 68e5231

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

.github/workflows/dispatch-release.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
description: Branch to release (prepare-release-X.X)
1212
required: true
1313
type: string
14+
pat-token:
15+
description: PAT token (with workflow permissions)
1416

1517
jobs:
1618
dispatch-release:
@@ -25,31 +27,6 @@ jobs:
2527
submodules: false
2628
ref: release-workflow
2729

28-
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1 v1.11.6
29-
id: app-token
30-
name: Generate app token
31-
with:
32-
app-id: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
33-
private-key: ${{ secrets.VERSIONBUMP_GHAPP_PRIVATE_KEY }}
34-
owner: gridsuite
35-
36-
- name: Get GitHub App User ID
37-
id: get-user-id
38-
run: |
39-
echo $(gh api "/users/${RUNGHA_APP_SLUG}[bot]")
40-
echo "user-id=$(gh api "/users/${RUNGHA_APP_SLUG}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
41-
env:
42-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
43-
RUNGHA_APP_SLUG: ${{ steps.app-token.outputs.app-slug }} # just for defense against script injection
44-
45-
- name: Setup git user
46-
run: |
47-
git config --global user.name "${RUNGHA_APP_SLUG}[bot]"
48-
git config --global user.email "${RUNGHA_USER_ID}+${RUNGHA_APP_SLUG}[bot]@users.noreply.github.com"
49-
env:
50-
RUNGHA_APP_SLUG: ${{ steps.app-token.outputs.app-slug }} # just for defense against script injection
51-
RUNGHA_USER_ID: ${{ steps.get-user-id.outputs.user-id }} # just for defense against script injection
52-
5330
- name: Load repo list from file or input
5431
id: load_repos
5532
run: |
@@ -81,4 +58,4 @@ jobs:
8158
8259
done <<< "${{ steps.load_repos.outputs.list }}"
8360
env:
84-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
61+
GH_TOKEN: ${{ github.event.inputs.pat-token }}

0 commit comments

Comments
 (0)