lact: mention NVIDIA (#360392)
[NixPkgs.git] / .github / workflows / periodic-merge-24h.yml
blob813d6a988efde779a0687be301c67451669b33f1
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.
8 name: "Periodic Merges (24h)"
11 on:
12   schedule:
13     # * is a special character in YAML so you have to quote this string
14     # Merge every 24 hours
15     - cron:  '0 0 * * *'
16   workflow_dispatch:
18 permissions:
19   contents: read
21 jobs:
22   periodic-merge:
23     permissions:
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
28     strategy:
29       # don't fail fast, so that all pairs are tried
30       fail-fast: false
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.
33       max-parallel: 1
34       matrix:
35         pairs:
36           - from: master
37             into: haskell-updates
38           - from: release-24.05
39             into: staging-next-24.05
40           - from: staging-next-24.05
41             into: staging-24.05
42           - from: release-24.11
43             into: staging-next-24.11
44           - from: staging-next-24.11
45             into: staging-24.11
46     name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
47     steps:
48       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50       - name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
51         uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
52         with:
53           type: now
54           from_branch: ${{ matrix.pairs.from }}
55           target_branch: ${{ matrix.pairs.into }}
56           github_token: ${{ secrets.GITHUB_TOKEN }}
58       - name: Comment on failure
59         uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
60         if: ${{ failure() }}
61         with:
62           issue-number: 105153
63           body: |
64             Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).