-
Notifications
You must be signed in to change notification settings - Fork 21
32 lines (31 loc) · 1.05 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
name: update-flake-lock
on:
workflow_dispatch:
schedule:
- cron: "45 3 * * 1" # runs weekly every Monday at 03:45 UTC
jobs:
lockfile:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repo"
uses: "actions/checkout@v4"
- name: "Install the Nix package manager"
uses: "cachix/install-nix-action@master"
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: "Update the lockfile"
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
nix flake update --commit-lock-file
cargo update
git add Cargo.lock
# Commit exits with an error when there is nothing to do
git commit -m "cargo update" || true
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v5"
with:
branch: "auto_update_deps"
title: "Bump flake.lock and Cargo.lock"
body: |
Automatically bumped the lock files.