prince-chrismc / count-used-by-action

Determine the number of times your action is called in workflows across GitHub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIT codecov used by

A GitHub Action to determine the number of times your action is called in workflows across GitHub.

Getting Started

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'

Periodically Creating a Badge

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

About

Determine the number of times your action is called in workflows across GitHub

License:MIT License


Languages

Language:TypeScript 95.3%Language:JavaScript 4.7%