Skip to content

Commit 7de6359

Browse files
authored
ci: replace OCTOKITBOT_PROJECT_ACTION_TOKEN and OCTOKITBOT_PAT with a token from https://github.com/apps/octokit (#671)
Apply changes from octokit/endpoint.js#482 Part of octokit/maintainers#34
1 parent 42321eb commit 7de6359

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/add_to_octokit_project.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
1414
steps:
15+
- uses: actions/create-github-app-token@v2
16+
id: app-token
17+
with:
18+
app-id: ${{ vars.OCTOKIT_APP_ID }}
19+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
1520
- uses: actions/[email protected]
1621
with:
1722
project-url: https://github.com/orgs/octokit/projects/10
18-
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
23+
github-token: ${{ steps.app-token.outputs.token }}
1924
labeled: "Status: Stale"
2025
label-operator: NOT

.github/workflows/release.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ jobs:
1919
name: release
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22+
- uses: actions/create-github-app-token@v2
23+
id: app-token
24+
with:
25+
app-id: ${{ vars.OCTOKIT_APP_ID }}
26+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
27+
- uses: actions/checkout@v4
2328
- uses: actions/setup-node@v4
2429
with:
2530
node-version: lts/*
@@ -28,10 +33,10 @@ jobs:
2833
- run: npm run build
2934
- run: npx semantic-release
3035
env:
31-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
36+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3237
NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }}
3338
- run: npm run docs
3439
- uses: maxheld83/ghpages@master
3540
env:
3641
BUILD_DIR: docs/
37-
GH_PAT: ${{ secrets.OCTOKIT_PAT }}
42+
GH_PAT: ${{ steps.app-token.outputs.token }}

.github/workflows/update.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ jobs:
88
update:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
11+
- uses: actions/create-github-app-token@v2
12+
id: app-token
13+
with:
14+
app-id: ${{ vars.OCTOKIT_APP_ID }}
15+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
16+
- uses: actions/checkout@v4
1217
- uses: actions/setup-node@v4
1318
with:
1419
node-version: "lts/*"
@@ -27,7 +32,7 @@ jobs:
2732
- name: Create Pull Request
2833
uses: gr2m/[email protected]
2934
env:
30-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
35+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3136
with:
3237
title: 🚧 GitHub OpenAPI spec changed
3338
body: >

0 commit comments

Comments
 (0)