From 77e7ec720fe290cf00974a0a506e24830b326c7c Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Thu, 11 Aug 2022 12:28:48 -0300 Subject: [PATCH] Use the more idiomatic property that signals a fork Pulled from https://til.cazzulino.com/devops-ci-cd/how-to-skip-steps-or-jobs-in-github-actions-for-prs-from-forks --- docs/concepts-guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts-guidelines.md b/docs/concepts-guidelines.md index f305ac2..9f71eee 100644 --- a/docs/concepts-guidelines.md +++ b/docs/concepts-guidelines.md @@ -127,7 +127,7 @@ jobs: example: runs-on: ubuntu-latest # Check if the event is not triggered by a fork - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !github.event.pull_request.head.repo.fork }} ``` For further reading regarding the security of pull requests, see this GitHub blog post titled [Keeping your GitHub Actions and workflows secure: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)