mirror of https://github.com/ecmwf/eccodes.git
Trigger CI when public PR is approved
This commit is contained in:
parent
6e24fac103
commit
1dfa419c44
|
@ -10,15 +10,20 @@ on:
|
||||||
- '**'
|
- '**'
|
||||||
|
|
||||||
# Trigger the workflow on pull request
|
# Trigger the workflow on pull request
|
||||||
pull_request_target: ~
|
pull_request: ~
|
||||||
|
|
||||||
# Trigger the workflow manually
|
# Trigger the workflow manually
|
||||||
workflow_dispatch: ~
|
workflow_dispatch: ~
|
||||||
|
|
||||||
|
# Trigger after public PR approved for CI
|
||||||
|
pull_request_target:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Run CI including downstream packages on self-hosted runners
|
# Run CI including downstream packages on self-hosted runners
|
||||||
downstream-ci:
|
downstream-ci:
|
||||||
name: downstream-ci
|
name: downstream-ci
|
||||||
|
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
||||||
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
|
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
|
||||||
with:
|
with:
|
||||||
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
|
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
@ -28,7 +33,7 @@ jobs:
|
||||||
private-downstream-ci:
|
private-downstream-ci:
|
||||||
name: private-downstream-ci
|
name: private-downstream-ci
|
||||||
needs: [downstream-ci]
|
needs: [downstream-ci]
|
||||||
if: success() || failure()
|
if: (success() || failure()) && ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
@ -45,6 +50,7 @@ jobs:
|
||||||
# Build downstream packages on HPC
|
# Build downstream packages on HPC
|
||||||
downstream-ci-hpc:
|
downstream-ci-hpc:
|
||||||
name: downstream-ci-hpc
|
name: downstream-ci-hpc
|
||||||
|
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
||||||
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
|
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
|
||||||
with:
|
with:
|
||||||
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
|
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
@ -54,7 +60,7 @@ jobs:
|
||||||
private-downstream-ci-hpc:
|
private-downstream-ci-hpc:
|
||||||
name: private-downstream-ci-hpc
|
name: private-downstream-ci-hpc
|
||||||
needs: [downstream-ci-hpc]
|
needs: [downstream-ci-hpc]
|
||||||
if: success() || failure()
|
if: (success() || failure()) && ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
Loading…
Reference in New Issue