@@ -64,36 +64,36 @@ jobs:
64
64
65
65
steps :
66
66
- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
67
- if : github.ref == 'refs/heads/master'
67
+ if : github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')
68
68
with :
69
69
fetch-depth : 0
70
70
71
71
- name : Use Node.js ${{ env.NODE_VERSION }}
72
72
uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
73
- if : github.ref == 'refs/heads/master'
73
+ if : github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')
74
74
with :
75
75
node-version : ${{ env.NODE_VERSION }}
76
76
77
- - if : ${{ runner.os == 'Windows' && github.ref == 'refs/heads/master'}}
77
+ - if : ${{ runner.os == 'Windows' && ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')) }}
78
78
run : echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV
79
79
80
- - if : ${{ matrix.docker == true && matrix.alpine == true && github.ref == 'refs/heads/master'}}
80
+ - if : ${{ ( matrix.docker == true && matrix.alpine == true) && ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')) }}
81
81
name : prebuild linux ${{ matrix.arch }} musl
82
82
run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20-alpine bin/sh -c 'apk add bash && cd /home && bash -c "/home/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules'
83
83
84
- - if : ${{ matrix.docker == true && matrix.alpine != true && github.ref == 'refs/heads/master' }}
84
+ - if : ${{ ( matrix.docker == true && matrix.alpine != true ) && ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')) }}
85
85
name : prebuild linux ${{ matrix.arch }}
86
86
run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh && rm -rf ffi node_modules'
87
87
88
88
- run : sudo chown -R $(id -u):$(id -g) prebuilds
89
- if : ${{ matrix.docker == true && github.ref == 'refs/heads/master' }}
89
+ if : ${{ matrix.docker == true && ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')) }}
90
90
91
91
- run : ./script/ci/prebuild.sh
92
- if : ${{ matrix.docker != true && github.ref == 'refs/heads/master'}}
92
+ if : ${{ matrix.docker != true && ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')) }}
93
93
94
94
- name : Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
95
95
uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
96
- if : github.ref == 'refs/heads/master'
96
+ if : github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')
97
97
with :
98
98
path : prebuilds/*.tar.gz
99
99
name : artifact-${{ matrix.docker == true && matrix.alpine == true && 'linux-musl' || matrix.docker == true && matrix.alpine == false && 'linux' || matrix.os }}-${{ matrix.arch }}
@@ -159,10 +159,10 @@ jobs:
159
159
fetch-depth : 0
160
160
161
161
- name : Download prebuilds
162
- if : github.ref == 'refs/heads/master'
162
+ if : github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')
163
163
uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
164
164
- run : FETCH_ASSETS=true REPO=pact-foundation/pact-js-core ./script/ci/check-release-libs.sh --fetch-assets
165
- if : github.ref != 'refs/heads/master'
165
+ if : ${{ github.ref != 'refs/heads/master' && !contains(github.event.pull_request.title, '(rebuild)')}}
166
166
env :
167
167
GITHUB_TOKEN : ${{ github.token }}
168
168
0 commit comments