mirror of https://github.com/o2sh/onefetch.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
name: Generate Language Badge |
|
on: |
|
schedule: |
|
# Once 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: Install Rust |
|
uses: dtolnay/rust-toolchain@v1 |
|
with: |
|
toolchain: stable |
|
- name: Get Language Count |
|
id: vars |
|
run: echo "::set-output name=language_count::$(cargo run -- --languages | wc -l)" |
|
- name: Get Badge |
|
run: curl https://img.shields.io/badge/languages-${{ steps.vars.outputs.language_count }}-blue > ./assets/language-badge.svg |
|
- name: Commit Badge |
|
continue-on-error: true |
|
run: | |
|
git add ./assets/language-badge.svg |
|
git config user.name "github-actions[bot]" |
|
git config user.email "github-actions[bot]@users.noreply.github.com" |
|
git commit -m "Update language badge [Skip CI]" |
|
git push
|
|
|