Skip to content

rolling

rolling #86

Workflow file for this run

# This workflow runs every morning at midnight.
# It runs cargo update and checks that no builds or tests are broken.
# If not, a PR is created with updated Cargo.lock files.
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
name: rolling
jobs:
update-dependencies:
name: cargo-update / update-dependencies
runs-on: ubuntu-latest
outputs:
pr-needed: ${{ steps.check-pr.outputs.changes }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Run cargo update
run: |
cargo update
cargo update --manifest-path examples/std/Cargo.toml
cargo update --manifest-path examples/rt633/Cargo.toml
cargo update --manifest-path examples/rt685s-evk/Cargo.toml
- name: Check diff
id: check-pr
run: |
git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT
- name: Upload Cargo.lock files
uses: actions/upload-artifact@v4
with:
name: updated-lock-files
path: |
**/Cargo.lock
check-build:
name: cargo-update / check-build
needs: update-dependencies
if: ${{ needs.update-dependencies.outputs.pr-needed == 'true' }}
uses: ./.github/workflows/check.yml
with:
download-lockfiles: true
pull-request:
name: cargo-update / pull-request
runs-on: ubuntu-latest
needs: [check-build, update-dependencies]
if: ${{ needs.update-dependencies.outputs.pr-needed == 'true' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Download Cargo.lock files
uses: actions/download-artifact@v4
with:
name: updated-lock-files
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "chore: update dependencies"
branch: rolling/update-dependencies
title: "chore: update dependencies"
body: |
Update Cargo.lock files using `cargo update`. All tests and builds passed.
labels: dependencies
reviewers: ec-code-owners