Skip to content

Commit 03f66b5

Browse files
authored
Use GITHUB_TOKEN instead of PAT in "Slash Command Dispatch" and "GMT Dev Tests" workflows (#2950)
1 parent 8be628e commit 03f66b5

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

.github/workflows/ci_tests_dev.yaml

+3-12
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,22 @@ jobs:
5757
# fetch all history so that setuptools-scm works
5858
fetch-depth: 0
5959

60-
# Generate token from GenericMappingTools bot
61-
- name: Generate token from GenericMappingTools bot
62-
uses: tibdex/github-app-token@v2
63-
if: github.event_name == 'repository_dispatch'
64-
id: generate-token
65-
with:
66-
app_id: ${{ secrets.APP_ID }}
67-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
68-
6960
# Checkout the pull request branch
7061
- name: Checkout
7162
uses: actions/[email protected]
7263
if: github.event_name == 'repository_dispatch'
7364
with:
74-
token: ${{ steps.generate-token.outputs.token }}
65+
token: ${{ secrets.GITHUB_TOKEN }}
7566
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
7667
ref: ${{ github.event.client_payload.pull_request.head.ref }}
7768
# fetch all history so that setuptools-scm works
7869
fetch-depth: 0
7970

8071
- name: Show job URL
8172
uses: peter-evans/[email protected]
82-
if: github.event_name == 'repository_dispatch' && (matrix.os == 'ubuntu-latest')
73+
if: github.event_name == 'repository_dispatch' && runner.os == 'Linux'
8374
with:
84-
token: ${{ steps.generate-token.outputs.token }}
75+
token: ${{ secrets.GITHUB_TOKEN }}
8576
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
8677
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
8778
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

.github/workflows/slash-command-dispatch.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,10 @@ jobs:
1313
if: ${{ github.event.issue.pull_request }}
1414
runs-on: ubuntu-latest
1515
steps:
16-
# Generate token from GenericMappingTools bot
17-
- uses: tibdex/github-app-token@v2
18-
id: generate-token
19-
with:
20-
app_id: ${{ secrets.APP_ID }}
21-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
22-
2316
- name: Slash Command Dispatch
2417
uses: peter-evans/slash-command-dispatch@v3
2518
with:
26-
token: ${{ steps.generate-token.outputs.token }}
19+
token: ${{ secrets.GITHUB_TOKEN }}
2720
commands: |
2821
format
2922
test-gmt-dev

0 commit comments

Comments
 (0)