Skip to content

Commit 04d0b01

Browse files
spenserblackgithub-actions[bot]o2sh
authoredNov 9, 2021
Add workflow for Minimum Rust Version badge (#527)
* Add workflow to get Minimum Rust version badge * Fix branch name * Only update badge when Rust project updated * Allow manual execution of Rust Version workflow * Pull changes before pushing version badge * Reorder pull * Fix output variable * Make pull `--ff-only` * Run `git status` To be able to see what's going on in the repo for possible debugging. * Update Rust version badge [Skip CI] * Add Rust Version badge to READMEs * msrv badge only on CD + renaming + fix paths * Percent encode `+` * Update msrv badge [Skip CI] * Remove `release.paths` `paths` is only valid for `push` or `pull_request`. https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: o2sh <[email protected]>
1 parent 72aaa68 commit 04d0b01

File tree

7 files changed

+33
-0
lines changed

7 files changed

+33
-0
lines changed
 

Diff for: ‎.github/workflows/msrv-badge.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Generate MSRV Badge
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
7+
jobs:
8+
make-badge:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Get Minimum Supported Rust Version
14+
uses: spenserblack/actions-msrv@v0.2
15+
id: get-msrv
16+
- name: Create Badge
17+
run: curl https://img.shields.io/badge/rustc-${{ steps.get-msrv.outputs.msrv }}%2B-blue > ./assets/msrv-badge.svg
18+
- name: Commit Badge
19+
continue-on-error: true
20+
run: |
21+
git status
22+
git pull --ff-only
23+
git add ./assets/msrv-badge.svg
24+
git config user.name "github-actions[bot]"
25+
git config user.email "github-actions[bot]@users.noreply.github.com"
26+
git commit -m "Update msrv badge [Skip CI]"
27+
git push

Diff for: ‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<a href="https://github.com/o2sh/onefetch/wiki/language-Support"><img src="assets/language-badge.svg"></a>
99
<a href="https://github.com/o2sh/onefetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/o2sh/onefetch/help%20wanted?color=green" alt="help wanted"></a>
1010
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
11+
<img src="assets/msrv-badge.svg">
1112
</p>
1213

1314
<p align="center">

Diff for: ‎assets/msrv-badge.svg

+1
Loading

Diff for: ‎docs/README.cn.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<a href="https://github.com/o2sh/onefetch/wiki/language-Support"><img src="../assets/language-badge.svg"></a>
99
<a href="https://github.com/o2sh/onefetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/o2sh/onefetch/help%20wanted?color=green" alt="help wanted"></a>
1010
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
11+
<img src="../assets/msrv-badge.svg">
1112
</p>
1213

1314
<img src="../assets/screenshot-1.png" align="right" height="240px">

Diff for: ‎docs/README.fa.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<a href="https://github.com/o2sh/onefetch/wiki/language-Support"><img src="../assets/language-badge.svg"></a>
1111
<a href="https://github.com/o2sh/onefetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/o2sh/onefetch/help%20wanted?color=green" alt="help wanted"></a>
1212
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
13+
<img src="../assets/msrv-badge.svg">
1314
</p>
1415

1516
<img src="../assets/screenshot-1.png" align="left" height="240px">

Diff for: ‎docs/README.ja.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<a href="https://github.com/o2sh/onefetch/wiki/language-Support"><img src="../assets/language-badge.svg"></a>
99
<a href="https://github.com/o2sh/onefetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/o2sh/onefetch/help%20wanted?color=green" alt="help wanted"></a>
1010
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
11+
<img src="../assets/msrv-badge.svg">
1112
</p>
1213

1314
<img src="../assets/screenshot-1.png" align="right" height="240px">

Diff for: ‎docs/README.ru.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<a href="https://github.com/o2sh/onefetch/wiki/language-Support"><img src="../assets/language-badge.svg"></a>
1010
<a href="https://github.com/o2sh/onefetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/o2sh/onefetch/help%20wanted?color=green" alt="help wanted"></a>
1111
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
12+
<img src="../assets/msrv-badge.svg">
1213
</p>
1314

1415
<img src="../assets/screenshot-1.png" align="right" height="240px">

0 commit comments

Comments
 (0)
Please sign in to comment.