From 5ad0f0eebe59e1d3c899cf6b66c9ce43b4870915 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 27 Mar 2024 13:15:56 +0800 Subject: [PATCH] feat: add used-by badge and workflow --- .github/workflows/used-by.yml | 27 +++++++++++++++++++++++++++ .gitignore | 1 + README.md | 1 + 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/used-by.yml create mode 100644 .gitignore diff --git a/.github/workflows/used-by.yml b/.github/workflows/used-by.yml new file mode 100644 index 0000000..ea70dc8 --- /dev/null +++ b/.github/workflows/used-by.yml @@ -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/used-by@v0.1.2 + 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: skip-changelog + delete-branch: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7275bb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ diff --git a/README.md b/README.md index 54937dd..b655631 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Main](https://github.com/commit-check/commit-check-action/actions/workflows/main.yaml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/main.yaml) [![Commit Check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/commit-check/commit-check-action) +[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=13&color=informational&logo=slickpic)](https://github.com/commit-check/commit-check-action/network/dependents) [![GitHub marketplace](https://img.shields.io/badge/Marketplace-commit--check--action-blue)](https://github.com/marketplace/actions/commit-check-action) A Github Action for checking commit message formatting, branch naming, committer name, email, commit signoff and more.