Skip to content

Commit ce1757f

Browse files
stevesCopilot
andauthored
Fix CodeQL workflow failing on fork PRs in github/docs (#61889)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f6aa36b commit ce1757f

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33-
- name: Generate GitHub App token
34-
id: app-token
35-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
36-
with:
37-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
38-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
39-
owner: github
40-
repositories: docs-engineering
4133

4234
- uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
4335
with:
@@ -50,6 +42,16 @@ jobs:
5042
with:
5143
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
5244

45+
- name: Generate GitHub App token
46+
if: ${{ failure() && github.event_name != 'pull_request' }}
47+
id: app-token
48+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
49+
with:
50+
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
51+
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
52+
owner: github
53+
repositories: docs-engineering
54+
5355
- uses: ./.github/actions/create-workflow-failure-issue
5456
if: ${{ failure() && github.event_name != 'pull_request' }}
5557
with:

0 commit comments

Comments
 (0)