Skip to content

Commit

Permalink
feat(workflow): add update_flake
Browse files Browse the repository at this point in the history
add workflow of auto update flake.lock
  • Loading branch information
misumisumi committed May 3, 2024
1 parent e4a57e5 commit 837413d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/update_flake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: update flake.lock
on:
# Scheduled update (1st of every month)
schedule: [{ cron: "30 02 1 * *" }]

jobs:
update-lockfile:
if: github.repository_owner == 'ayamir'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to count the commits
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run flake-update
run: |
nix flake update
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(lockfile): auto update flake.lock"
commit_user_name: "github-actions[bot]"
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
file_pattern: "flake.lock"

0 comments on commit 837413d

Please sign in to comment.