Schedule rust update in build_and_test.yml (#1687)

* ci cron

* correct regex
This commit is contained in:
Dongjia "toka" Zhang 2023-11-21 23:49:36 +01:00 committed by GitHub
parent ba394c4acc
commit 9345b80256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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