1 # This action periodically merges base branches into staging branches.
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.
8 name: "Periodic Merges (6h)"
13 # * is a special character in YAML so you have to quote this string
24 contents: write # for devmasx/merge-branch to merge branches
25 pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
26 if: github.repository_owner == 'NixOS'
27 runs-on: ubuntu-latest
29 # don't fail fast, so that all pairs are tried
31 # certain branches need to be merged in order, like master->staging-next->staging
32 # and disabling parallelism ensures the order of the pairs below.
40 name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
42 - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
44 - name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
45 uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
48 from_branch: ${{ matrix.pairs.from }}
49 target_branch: ${{ matrix.pairs.into }}
50 github_token: ${{ secrets.GITHUB_TOKEN }}
52 - name: Comment on failure
53 uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
58 Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).