Skip to content

Commit b1139e5

Browse files
authored
Prevent Update Notebook dts action from triggering on forked repositories (#2871)
* Add check for the main repository so the action doesn't trigger on forks. * Update if syntax to match the documentation * Move the repository check. Put the check in the overall definition so none of the workflow runs if not the main repository. * Add check to the codeql workflow too
1 parent 395bb2e commit b1139e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111

1212
# CodeQL runs on ubuntu-latest and windows-latest
1313
runs-on: ubuntu-latest
14+
if: github.repository == 'PowerShell/vscode-powershell'
1415

1516
steps:
1617
- name: Checkout repository

.github/workflows/updateNotebookApi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
defaults:
1414
run:
1515
shell: pwsh
16+
if: github.repository == 'PowerShell/vscode-powershell'
1617

1718
steps:
1819
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

0 commit comments

Comments
 (0)