1# This action periodically merges base branches into staging branches.
2# This is done to
3# * prevent conflicts or rather resolve them early
4# * make all potential breakage happen on the staging branch
5# * and make sure that all major rebuilds happen before the staging
6# branch get’s merged back into its base branch.
7
8name: "Periodic Merges (6h)"
9
10on:
11 schedule:
12 # * is a special character in YAML so you have to quote this string
13 # Merge every 6 hours
14 - cron: '0 */6 * * *'
15 workflow_dispatch:
16
17permissions: {}
18
19defaults:
20 run:
21 shell: bash
22
23jobs:
24 periodic-merge:
25 if: github.repository_owner == 'NixOS'
26 strategy:
27 # don't fail fast, so that all pairs are tried
28 fail-fast: false
29 # certain branches need to be merged in order, like master->staging-next->staging
30 # and disabling parallelism ensures the order of the pairs below.
31 max-parallel: 1
32 matrix:
33 pairs:
34 - from: master
35 into: staging-next
36 - from: staging-next
37 into: staging
38 uses: ./.github/workflows/periodic-merge.yml
39 with:
40 from: ${{ matrix.pairs.from }}
41 into: ${{ matrix.pairs.into }}
42 name: ${{ format('{0} → {1}', matrix.pairs.from, matrix.pairs.into) }}
43 secrets: inherit