-
Notifications
You must be signed in to change notification settings - Fork 6
109 lines (92 loc) · 3.63 KB
/
update-flake-lock.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Update Flake Lock
on:
schedule:
- cron: "0 4 * * *" # Daily at 05:00 CET / 06:00 CEST
workflow_dispatch:
repository_dispatch:
env:
IS_NIXOS_OLDSTABLE_DEPRECATED: ${{ vars.IS_NIXOS_OLDSTABLE_DEPRECATED }}
NIXOS_OLDSTABLE_BRANCH: ${{ vars.NIXOS_OLDSTABLE_BRANCH }}
NIXOS_STABLE_BRANCH: ${{ vars.NIXOS_STABLE_BRANCH }}
jobs:
update_main_develop_and_stable:
name: Update Main and Stable Branches
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [
"main",
"develop",
"release-${{ vars.NIXOS_STABLE_BRANCH }}"
]
env:
UPDATE_BRANCH: update/flake/${{ matrix.branch }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ matrix.branch }}
- name: Install Nix
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@a2bbe0274e3a0c4194390a1e445f734c597ebc37 # v24
with:
branch: "${{ env.UPDATE_BRANCH }}"
pr-labels: |
dependencies
merge-queue
pr-title: "Update flake.lock for `${{ matrix.branch }}`"
pr-base: ${{ matrix.branch }}
pr-body: |
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
```
{{ env.GIT_COMMIT_MESSAGE }}
```
### Running GitHub Actions on this PR
GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action.
To run GitHub Actions workflows on this PR, run:
```sh
git branch -D ${{ env.UPDATE_BRANCH }}
git fetch origin
git checkout ${{ env.UPDATE_BRANCH }}
git commit --amend --no-edit
git push origin ${{ env.UPDATE_BRANCH }} --force
```
update_oldstable:
name: Update Oldstable Branch
if: ${{ vars.IS_NIXOS_OLDSTABLE_DEPRECATED == '0' }}
runs-on: ubuntu-latest
env:
UPDATE_BRANCH: update/flake/release-${{ vars.NIXOS_OLDSTABLE_BRANCH }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: "release-${{ vars.NIXOS_OLDSTABLE_BRANCH }}"
- name: Install Nix
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@a2bbe0274e3a0c4194390a1e445f734c597ebc37 # v24
with:
branch: "${{ env.UPDATE_BRANCH }}"
pr-labels: |
dependencies
merge-queue
pr-title: "Update flake.lock for `release-${{ vars.NIXOS_OLDSTABLE_BRANCH }}`"
pr-base: "release-${{ vars.NIXOS_OLDSTABLE_BRANCH }}"
pr-body: |
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
```
{{ env.GIT_COMMIT_MESSAGE }}
```
### Running GitHub Actions on this PR
GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action.
To run GitHub Actions workflows on this PR, run:
```sh
git branch -D ${{ env.UPDATE_BRANCH }}
git fetch origin
git checkout ${{ env.UPDATE_BRANCH }}
git commit --amend --no-edit
git push origin ${{ env.UPDATE_BRANCH }} --force
```