@@ -2,7 +2,7 @@ name: 'Build & Test'
22on :
33 push :
44 branches :
5- - master
5+ - develop
66 - release/**
77 pull_request :
88 workflow_dispatch :
4242
4343 # GH will use the first restore-key it finds that matches
4444 # So it will start by looking for one from the same branch, else take the newest one it can find elsewhere
45- # We want to prefer the cache from the current master branch, if we don't find any on the current branch
45+ # We want to prefer the cache from the current develop branch, if we don't find any on the current branch
4646 NX_CACHE_RESTORE_KEYS : |
4747 nx-Linux-${{ github.ref }}-${{ github.event.inputs.commit || github.sha }}
4848 nx-Linux-${{ github.ref }}
49- nx-Linux-refs/heads/master
49+ nx-Linux-refs/heads/develop
5050 nx-Linux
5151
5252jobs :
@@ -134,7 +134,7 @@ jobs:
134134 changed_browser_integration : ${{ steps.changed.outputs.browser_integration }}
135135 changed_any_code : ${{ steps.changed.outputs.any_code }}
136136 # Note: These next three have to be checked as strings ('true'/'false')!
137- is_master : ${{ github.ref == 'refs/heads/master ' }}
137+ is_develop : ${{ github.ref == 'refs/heads/develop ' }}
138138 is_release : ${{ startsWith(github.ref, 'refs/heads/release/') }}
139139 force_skip_cache :
140140 ${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ') }}
@@ -202,7 +202,7 @@ jobs:
202202 - name : NX cache
203203 uses : actions/cache@v3
204204 # Disable cache when:
205- # - on master
205+ # - on develop
206206 # - on release branches
207207 # - when PR has `ci-skip-cache` label
208208 if : |
@@ -211,9 +211,9 @@ jobs:
211211 with :
212212 path : node_modules/.cache/nx
213213 key : nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }}
214- # On master branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
214+ # On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
215215 restore-keys :
216- ${{needs.job_get_metadata.outputs.is_master == 'false' && env.NX_CACHE_RESTORE_KEYS || 'nx-never-restore'}}
216+ ${{needs.job_get_metadata.outputs.is_develop == 'false' && env.NX_CACHE_RESTORE_KEYS || 'nx-never-restore'}}
217217
218218 - name : Build packages
219219 # Under normal circumstances, using the git SHA as a cache key, there shouldn't ever be a cache hit on the built
@@ -272,8 +272,7 @@ jobs:
272272 needs : [job_get_metadata, job_build]
273273 timeout-minutes : 15
274274 runs-on : ubuntu-20.04
275- # Size Check will error out outside of the context of a PR or master branch
276- if : github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_master == 'true'
275+ if : github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true'
277276 steps :
278277 - name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
279278 uses : actions/checkout@v3
@@ -283,7 +282,6 @@ jobs:
283282 uses : actions/setup-node@v3
284283 with :
285284 # The size limit action runs `yarn` and `yarn build` when this job is executed on
286- # `master`. We can't change this without making changes to the action, so we'll
287285 # use Node 14 for now.
288286 node-version : ' 14'
289287 - name : Check dependency cache
@@ -301,6 +299,7 @@ jobs:
301299 with :
302300 github_token : ${{ secrets.GITHUB_TOKEN }}
303301 skip_step : build
302+ main_branch : develop
304303
305304 job_lint :
306305 name : Lint
0 commit comments