Skip to content

Commit

Permalink
ci: add flake update job (#53)
Browse files Browse the repository at this point in the history
* Add flake update job

* Update .github/workflows/flake_update.yaml

Co-authored-by: Jost Schulte <[email protected]>

* Remove experimental commands

* Pin Nix in the test workflow

---------

Co-authored-by: Jost Schulte <[email protected]>
  • Loading branch information
ThetaSinner and jost-s authored Mar 27, 2024
1 parent a2a60d8 commit 835548a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/flake_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "flake_update"

on:
workflow_dispatch:
schedule:
# At 7:00am on Monday
- cron: "0 7 * * 1"

jobs:
flake_update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install nix
uses: cachix/install-nix-action@v25
with:
install_url: https://releases.nixos.org/nix/nix-2.20.4/install

- name: Flake update
run: |
nix flake update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore(nix): update flake.lock"
title: "Update flake.lock"
body: "This PR updates the flake.lock file."
branch: "update-flake-lock"
branch-suffix: "short-commit-hash"
base: "main"
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

- name: Install nix
uses: cachix/install-nix-action@v25
with:
install_url: https://releases.nixos.org/nix/nix-2.20.4/install

- name: Set up cachix
uses: cachix/cachix-action@v14
Expand Down

0 comments on commit 835548a

Please sign in to comment.