Update dependencies #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
name: Update dependencies | |
jobs: | |
code_check: | |
name: Update dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: clippy, rustfmt | |
profile: minimal | |
- name: Install 'cargo-edit' | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-edit | |
- name: Upgrade dependencies | |
uses: actions-rs/cargo@v1 | |
with: | |
command: upgrade | |
- name: Update lock file | |
uses: actions-rs/cargo@v1 | |
with: | |
command: update | |
- name: Check if code still compiles | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all-targets --release | |
- name: Commit changes, if any | |
run: | | |
git config --global user.name 'Ticky' | |
git config --global user.email '[email protected]' | |
git diff --quiet && git diff --staged --quiet || git commit -am "Automatically update dependencies" | |
git push |