Deprecated: ⚠️ There's now official support for this in GitHub's UI ⚠️
A GitHub Action to determine the number of times your action is called in workflows across GitHub.
To have an action that only logs the number of callers, use the action as follows:
steps:
- id: count
uses: prince-chrismc/count-used-by-action@v1
- run: echo 'Found ${{ steps.count.outputs.counted }} callers'
To have the workflow generate a badge, try usinng the action as follows:
name: Count Used By
on:
schedule:
- cron: "0 0 * * *" # Everyday
workflow_dispatch: {}
jobs:
used-by:
runs-on: ubuntu-latest
steps:
- id: count
uses: prince-chrismc/count-used-by-action@v1
- uses: actions/checkout@v2
- run: |
echo '{
"schemaVersion": 1,
"label": "Used By",
"message": "${{ steps.count.outputs.counted }}",
"color": "blue",
"namedLogo": "githubactions",
"logoColor": "#fff"
}' > .github/used-by.json
- uses: EndBug/add-and-commit@v8
with:
default_author: github_actions