Prevent GitHub Actions from unintentionally running on forks #611
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Typecheck PRs | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
typecheck: | |
# Only run this job on the original repository! To run this on your fork, | |
# update or remove the line below. | |
if: github.repository == '@code-chronicles-code/leetcode-curriculum' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up everything | |
uses: ./.github/workflows/set-up-everything | |
- name: Typecheck | |
run: yarn typecheck | |
# TODO: Annotations of files that fail the typecheck? | |
# TODO: Maybe write up a job summary per https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary |