From 3847c02b3bd0f5a7e3b04343d66d6f6a939d13ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy=20=C3=81kos?= Date: Tue, 15 Oct 2024 13:09:31 +0200 Subject: [PATCH] Update build-test.yml (#13) --- .github/workflows/build-test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 2679071..6534182 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -4,7 +4,10 @@ on: branches: [ "master" ] pull_request: branches: [ "master" ] - + pull_request_target: + types: [labeled] + branches: [ "master" ] + workflow_dispatch: jobs: @@ -14,8 +17,16 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout Code + if: github.event_name == 'pull_request_target' || contains(github.event.pull_request.labels.*.name, 'safe to test') + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Checkout Code for Push + if: github.event_name == 'push' || github.event_name == 'pull_request' + uses: actions/checkout@v3 - - uses: actions/checkout@v3 - name: Set up Python 3.9 uses: actions/setup-python@v3 with: