File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,26 @@ concurrency:
15
15
cancel-in-progress : true
16
16
17
17
jobs :
18
+ job_metadata :
19
+ runs-on : ubuntu-latest
20
+ outputs :
21
+ commit_message : ${{ steps.get_commit_message.outputs.commit_message }}
22
+ steps :
23
+ - name : Checkout
24
+ uses : actions/checkout@v3
25
+ with :
26
+ fetch-depth : 2
27
+ - name : Print head git commit message
28
+ id : get_commit_message
29
+ run : |
30
+ if [[ -z "$COMMIT_MSG" ]]; then
31
+ COMMIT_MSG=$(git show -s --format=%s $REF)
32
+ fi
33
+ echo commit_message=$COMMIT_MSG | tee -a $GITHUB_OUTPUT
34
+ env :
35
+ COMMIT_MSG : ${{ github.event.head_commit.message }}
36
+ REF : ${{ github.event.pull_request.head.sha }}
37
+
18
38
build-sdist :
19
39
name : Build sdist
20
40
runs-on : ubuntu-latest
29
49
30
50
build-wheel :
31
51
name : Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
52
+ needs : [job_metadata]
32
53
runs-on : ${{ matrix.buildplat[0] }}
33
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message , '[build wheels]')
54
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || contains(needs.job_metadata.outputs.commit_message , '[build wheels]')
34
55
strategy :
35
56
fail-fast : false
36
57
matrix :
You can’t perform that action at this time.
0 commit comments