@@ -64,36 +64,36 @@ jobs:
6464
6565 steps :
6666 - 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)')
6868 with :
6969 fetch-depth : 0
7070
7171 - name : Use Node.js ${{ env.NODE_VERSION }}
7272 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)')
7474 with :
7575 node-version : ${{ env.NODE_VERSION }}
7676
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)')) }}
7878 run : echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV
7979
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)')) }}
8181 name : prebuild linux ${{ matrix.arch }} musl
8282 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'
8383
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)')) }}
8585 name : prebuild linux ${{ matrix.arch }}
8686 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'
8787
8888 - 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)')) }}
9090
9191 - 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)')) }}
9393
9494 - name : Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
9595 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)')
9797 with :
9898 path : prebuilds/*.tar.gz
9999 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:
159159 fetch-depth : 0
160160
161161 - name : Download prebuilds
162- if : github.ref == 'refs/heads/master'
162+ if : github.ref == 'refs/heads/master' || contains(github.event.pull_request.title, '(rebuild)')
163163 uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
164164 - 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)')}}
166166 env :
167167 GITHUB_TOKEN : ${{ github.token }}
168168
0 commit comments