Skip to content

create used-by.yml to update Used By badge #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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