Skip to content

📝 define MSRV

📝 define MSRV #9

Workflow file for this run

name: pr
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
msrv-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.0.0
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: baptiste0928/cargo-install@v2.2.0
with:
crate: cargo-msrv
- id: msrv
run: |
cargo msrv list 2> result.txt
echo 'The MSRV will not change.' > message.md
echo "new_msrv=$(grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' result.txt | tail -n 1 | cut -d ' ' -f 2)" # >> "$GITHUB_OUTPUT"
echo "current_msrv=$(cut -d \" -f 2 < .clippy.toml)" # >> "$GITHUB_OUTPUT"
- if: steps.msrv.outputs.new_msrv != steps.msrv.outputs.current_msrv
run: echo 'Please update the MSRV to ${{ steps.msrv.outputs.new_msrv }}.' > message.md
- uses: thollander/actions-comment-pull-request@v2.4.2
with:
comment_tag: msrv-changes
filePath: message.md