diff --git a/.github/workflows/build-hpc.yml b/.github/workflows/build-hpc.yml index 7b52a684..41f1a40b 100644 --- a/.github/workflows/build-hpc.yml +++ b/.github/workflows/build-hpc.yml @@ -17,6 +17,10 @@ on: # Allow workflow to be dispatched on demand workflow_dispatch: ~ + # Trigger after public PR approved for CI + pull_request_target: + types: [labeled] + env: ECTRANS_TOOLS: ${{ github.workspace }}/.github/tools CTEST_PARALLEL_LEVEL: 1 @@ -25,6 +29,7 @@ env: jobs: ci-hpc: name: ci-hpc + if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }} strategy: fail-fast: false # false: try to complete all jobs diff --git a/.github/workflows/label-public-pr.yml b/.github/workflows/label-public-pr.yml new file mode 100644 index 00000000..eda99006 --- /dev/null +++ b/.github/workflows/label-public-pr.yml @@ -0,0 +1,10 @@ +# Manage labels of pull requests that originate from forks +name: label-public-pr + +on: + pull_request_target: + types: [opened, synchronize] + +jobs: + label: + uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2 \ No newline at end of file