Skip to content

Update Flake Lock

Update Flake Lock #12

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
```