From 4101eedc7e1be796601fdbcb7449dd7e0bf32701 Mon Sep 17 00:00:00 2001 From: okuuva Date: Sun, 30 Apr 2023 11:25:13 +0300 Subject: [PATCH] ci: fix stylua workflow (#22) Workflow was broken for everybody except me since pull_request trigger only works properly if every contributor has write access to the repo. With fork based workflow prevalent in Github the trigger to use is pull_request_target where the config and access token comes from main branch instead of the PR itself. Other notable changes: - Only run checks if lua files change - Run even if PR targets some branch other than main --- .github/workflows/stylua.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index dad80b1..847a466 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -1,7 +1,7 @@ on: - pull_request: - branches: - - main + pull_request_target: + paths: + - "**.lua" jobs: stylua: