Skip to content

Commit

Permalink
Create used-by.yml to update Used By badge (#211)
Browse files Browse the repository at this point in the history
* Create used-by.yml to update Used By badge

* add used-by badge to README.md
  • Loading branch information
shenxianpeng authored Mar 20, 2024
1 parent b5db5b1 commit 960660a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/used-by.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Used By

on:
schedule:
# https://crontab.guru/
- cron: '0 9 * * 1' # At 09:00 on Monday.
workflow_dispatch:

jobs:
used-by:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shenxianpeng/[email protected]
with:
repo: '${{ github.repository }}'
update-badge: 'true'

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
add-paths: "README.md" # the file path to commit
commit-message: "chore: update used-by badge by github-actions[bot]"
title: "chore: automatically update used-by badge"
base: main
labels: documentation
delete-branch: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# C/C++ Linter Action <sub><sup>| clang-format & clang-tidy</sup></sub>

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cpp-linter/cpp-linter-action)
[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=523&color=informational&logo=slickpic)](https://github.com/cpp-linter/cpp-linter-action/network/dependents)<!-- used by badge -->
[![GitHub marketplace](https://img.shields.io/badge/marketplace-C%2FC%2B%2B%20Linter-blue?logo=github)](https://github.com/marketplace/actions/c-c-linter)
[![cpp-linter](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml)
[![MkDocs Deploy](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/mkdocs-deploy.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/mkdocs-deploy.yml)
Expand Down

0 comments on commit 960660a

Please sign in to comment.