Generate MSRV Badge #130
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
name: Generate MSRV Badge | |
on: | |
schedule: | |
# Once every week at midnight UTC | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
jobs: | |
make-badge: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.BADGE_TOKEN }} | |
- name: Get Minimum Supported Rust Version | |
uses: spenserblack/[email protected] | |
id: get-msrv | |
timeout-minutes: 60 | |
- name: Create Badge | |
run: curl https://img.shields.io/badge/rustc-${{ steps.get-msrv.outputs.msrv }}%2B-blue > ./assets/msrv-badge.svg | |
- name: Commit Badge | |
continue-on-error: true | |
run: | | |
git status | |
git pull --ff-only | |
git add ./assets/msrv-badge.svg | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git commit -m "Update msrv badge [Skip CI]" | |
git push |