Add github action for updating the lockfiles

This commit is contained in:
Gwilym Kuiper 2022-02-24 20:25:44 +00:00
parent c2daa64329
commit 218058cfd5
2 changed files with 34 additions and 0 deletions

15
.github/scripts/update-lockfiles.sh vendored Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
function update_lockfiles() {
for toml in **/Cargo.toml; do
(cd "$(dirname "$toml")" && cargo generate-lockfile)
done
}
update_lockfiles
update_lockfiles
update_lockfiles
update_lockfiles
git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -a -m 'Update lockfiles'
git push

19
.github/workflows/update-lockfiles.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Update lockfiles
on:
push:
branches: [ 'renovate/*' ]
pull_request:
branches: [ 'renovate/*' ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Set CARGO_TARGET_DIR
run: echo "CARGO_TARGET_DIR=$HOME/target" >> $GITHUB_ENV
- name: Update lock files
run: bash .github/scripts/update-lockfiles.sh