Skip to content

Commit 960660a

Browse files
authored
Create used-by.yml to update Used By badge (#211)
* Create used-by.yml to update Used By badge * add used-by badge to README.md
1 parent b5db5b1 commit 960660a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/used-by.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Used By
2+
3+
on:
4+
schedule:
5+
# https://crontab.guru/
6+
- cron: '0 9 * * 1' # At 09:00 on Monday.
7+
workflow_dispatch:
8+
9+
jobs:
10+
used-by:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: shenxianpeng/[email protected]
15+
with:
16+
repo: '${{ github.repository }}'
17+
update-badge: 'true'
18+
19+
- name: Create Pull Request
20+
uses: peter-evans/create-pull-request@v6
21+
with:
22+
add-paths: "README.md" # the file path to commit
23+
commit-message: "chore: update used-by badge by github-actions[bot]"
24+
title: "chore: automatically update used-by badge"
25+
base: main
26+
labels: documentation
27+
delete-branch: true

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# C/C++ Linter Action <sub><sup>| clang-format & clang-tidy</sup></sub>
2121

2222
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cpp-linter/cpp-linter-action)
23+
[![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 -->
2324
[![GitHub marketplace](https://img.shields.io/badge/marketplace-C%2FC%2B%2B%20Linter-blue?logo=github)](https://github.com/marketplace/actions/c-c-linter)
2425
[![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)
2526
[![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)

0 commit comments

Comments
 (0)