From 7a61520e28db26f049490888c4d9de8ba75f0a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= Date: Fri, 12 Jan 2024 09:17:44 -0500 Subject: [PATCH] Update Artikodin pull request trigger to pull_request_target (#5) The `pull_request_target` trigger works in the context of the base branch, allowing to give access to secrets even in the context of forks, since this wouldn't run code from the pull request but code from the base branch. This change will allow this workflow to run with secrets even if a pull request is made from a fork. --- .github/workflows/artikodin.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/artikodin.yaml b/.github/workflows/artikodin.yaml index 58d3acf..0265b23 100644 --- a/.github/workflows/artikodin.yaml +++ b/.github/workflows/artikodin.yaml @@ -2,8 +2,11 @@ name: Artikodin pull-request handler on: - # Runs on a pull request for the main branch - pull_request: + # Runs on a pull request for the main branch (we use + # 'pull_request_target' instead of 'pull_request' so + # it also works for forks, since the secrets would + # otherwise not be available for forks. + pull_request_target: types: # Default events - opened