File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 9
9
# Allow workflow to be dispatched on demand
10
10
workflow_dispatch : ~
11
11
12
+ # Trigger after public PR approved for CI
13
+ pull_request_target :
14
+ types : [labeled]
15
+
12
16
env :
13
17
ECWAM_TOOLS : ${{ github.workspace }}/.github/tools
14
18
CTEST_PARALLEL_LEVEL : 1
17
21
jobs :
18
22
ci-hpc :
19
23
name : ci-hpc
24
+ if : ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
20
25
21
26
strategy :
22
27
fail-fast : false # false: try to complete all jobs
@@ -119,15 +124,17 @@ jobs:
119
124
popd
120
125
{% endfor %}
121
126
122
- mkdir -p ${{ github.repository }}
123
- pushd ${{ github.repository }}
127
+ REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
128
+ SHA=${{ github.event.pull_request.head.sha || github.sha }}
129
+ mkdir -p $REPO
130
+ pushd $REPO
124
131
git init
125
- git remote add origin ${{ github.server_url }}/${{ github.repository }}
126
- git fetch origin ${{ github.sha }}
132
+ git remote add origin ${{ github.server_url }}/$REPO
133
+ git fetch origin $SHA
127
134
git reset --hard FETCH_HEAD
128
135
popd
129
136
130
- cmake -G Ninja -S ${{ github.repository }} -B build \
137
+ cmake -G Ninja -S $REPO -B build \
131
138
{% for name in dependencies %}
132
139
{% set org, proj = name.split('/') %}
133
140
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
Original file line number Diff line number Diff line change
1
+ # Manage labels of pull requests that originate from forks
2
+ name : label-public-pr
3
+
4
+ on :
5
+ pull_request_target :
6
+ types : [opened, synchronize]
7
+
8
+ jobs :
9
+ label :
10
+ uses : ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2
11
+
You can’t perform that action at this time.
0 commit comments