Add GH action to bump lock files.

This commit is contained in:
r-vdp 2023-05-29 11:39:41 +02:00
parent 175f673e11
commit b72c654f8a
No known key found for this signature in database

31
.github/workflows/update-flake-lock.yml vendored Normal file
View file

@ -0,0 +1,31 @@
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@v3"
- 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
git commit -m "cargo update"
- 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.