.github/workflows/cargo-upgrade.yaml #3
This file contains hidden or 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: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * 1" | |
| jobs: | |
| cargo-upgrade: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo | |
| - uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: cargo-edit | |
| - run: cargo upgrade -i --recursive true | |
| - run: cargo update | |
| continue-on-error: true | |
| - run: echo "message=upgrade rust dependencies @ $(date +%Y%m%dT%H:%M:%S%Z)" >> "$GITHUB_ENV" | |
| - uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: ${{ env.message }} | |
| title: upgrade rust dependencies | |
| branch: cargo-upgrade |