From 9cac050aeaa9acc02b4b970a187b691315f16505 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Wed, 24 Nov 2021 10:26:09 +0000 Subject: [PATCH] Update CI workflows to use pull_request_target instead of pull_request Fixes #218 https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/ It appears that in forked repos, the `pull_request` event does not allow access to secrets, for security, and therefore any CI builds from forks will fail. The blog post above suggests that using `pull_request_target` runs the same build but in a safer context, meaning secrets can be accessed. This should fix the issue of contributed PRs failing. --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3f11c08a..63eb0a3d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -2,7 +2,7 @@ name: CI on: push: - pull_request: + pull_request_target: schedule: - cron: '37 9 1 * *'