From 6c7d208c3765c85e75ee866bc9dcab42ad54a9bf Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Thu, 15 Feb 2024 09:31:47 +1100 Subject: [PATCH] workflows: factor out event name guard Signed-off-by: Gerwin Klein --- .github/workflows/sel4test-hw.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sel4test-hw.yml b/.github/workflows/sel4test-hw.yml index 686ed80d..c40f713c 100644 --- a/.github/workflows/sel4test-hw.yml +++ b/.github/workflows/sel4test-hw.yml @@ -25,13 +25,14 @@ jobs: name: Freeze Code runs-on: ubuntu-latest if: ${{ github.event_name == 'pull_request_target' && + ( github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'hw-build') || contains(github.event.pull_request.labels.*.name, 'hw-test')) || - github.event_name == 'pull_request_target' && github.event.action == 'labeled' && (github.event.label.name == 'hw-build' || - github.event.label.name == 'hw-test') }} + github.event.label.name == 'hw-test') + ) }} outputs: xml: ${{ steps.repo.outputs.xml }} steps: