From 9345b80256d36954bbdbb902f1a8c99076a3d611 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Tue, 21 Nov 2023 23:49:36 +0100 Subject: [PATCH] Schedule rust update in build_and_test.yml (#1687) * ci cron * correct regex --- .github/workflows/update_rust_toolchain.yml | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update_rust_toolchain.yml diff --git a/.github/workflows/update_rust_toolchain.yml b/.github/workflows/update_rust_toolchain.yml new file mode 100644 index 0000000000..03eb6fa295 --- /dev/null +++ b/.github/workflows/update_rust_toolchain.yml @@ -0,0 +1,29 @@ +name: Update Rust toolchain + +on: + schedule: + - cron: '0 0 * * *' # Debug + +jobs: + update-timestamp: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + ref: update_from_ci + - uses: actions/setup-python@v3 + with: + python-version: '3.10' + + - name: Setup Git + run: | + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + + - name: Commit & push data + run: | + sed -i 's/rustup toolchain install nightly[0-9a-ZA-Z-]*/\`date +"rustup toolchain install nightly-%Y-%m-%d"\`/' ./.github/workflows/build_and_test.yml + git add -u + git commit -m "Update rust toolchain & time [$(date +'%Y-%m-%d %H:%M')]" + git push \ No newline at end of file