Skip to content

Commit d74915b

Browse files
committed
Use GitHub App token for workflow authentication
Replaced personal access token with GitHub App token for authentication in workflows.
1 parent 0064d14 commit d74915b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/generate-kong-conf-json.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,18 @@ jobs:
3737
with:
3838
egress-policy: audit
3939

40+
- name: Create GitHub App Token
41+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf
42+
id: app-token
43+
with:
44+
app-id: ${{ vars.GH_APP_KONG_DOCS_ID }}
45+
private-key: ${{ secrets.GH_APP_KONG_DOCS_SECRET }}
46+
owner: Kong
47+
4048
- name: Checkout developer.konghq.com
4149
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4250
with:
43-
token: ${{ secrets.PAT }}
51+
token: ${{ steps.app-token.outputs.token }}
4452

4553
- name: Setup Node.js
4654
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
@@ -58,7 +66,7 @@ jobs:
5866
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
5967
with:
6068
repository: 'Kong/kong-ee'
61-
token: ${{ secrets.PAT }}
69+
token: ${{ steps.app-token.outputs.token }}
6270
path: 'kong-ee'
6371
ref: ${{ inputs.kong_ee_branch }}
6472

@@ -98,7 +106,7 @@ jobs:
98106
- Processed Kong version ${{ inputs.version }}
99107
100108
labels: skip-changelog,review:general
101-
token: ${{ secrets.PAT }}
109+
token: ${{ steps.app-token.outputs.token }}
102110
branch: auto/generate-kong-conf-json-${{ github.run_number }}
103111
base: ${{ inputs.dev_site_base_branch }}
104112
add-paths: |
@@ -107,4 +115,4 @@ jobs:
107115
- name: No changes detected
108116
if: steps.changes.outputs.changed == 'false'
109117
run: |
110-
echo "No changes detected in the kong-conf JSON files. No pull request will be created."
118+
echo "No changes detected in the kong-conf JSON files. No pull request will be created."

0 commit comments

Comments
 (0)