From 218058cfd5cd940345b214f6e4c04ba2a1a57ff4 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 24 Feb 2022 20:25:44 +0000 Subject: [PATCH] Add github action for updating the lockfiles --- .github/scripts/update-lockfiles.sh | 15 +++++++++++++++ .github/workflows/update-lockfiles.yml | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 .github/scripts/update-lockfiles.sh create mode 100644 .github/workflows/update-lockfiles.yml diff --git a/.github/scripts/update-lockfiles.sh b/.github/scripts/update-lockfiles.sh new file mode 100755 index 00000000..7ffd89d8 --- /dev/null +++ b/.github/scripts/update-lockfiles.sh @@ -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 diff --git a/.github/workflows/update-lockfiles.yml b/.github/workflows/update-lockfiles.yml new file mode 100644 index 00000000..dae3f280 --- /dev/null +++ b/.github/workflows/update-lockfiles.yml @@ -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 \ No newline at end of file