count-action-users
Overview
The count-action-users GitHub Action is a meta-action to monitor and report the number of users of a GitHub Action. It generates a Shields endpoint with the count of the number of workflows that use a GitHub Action. It is thus a tool for maintainers of GitHub Actions, and it can be used to insert a badge with a users count into the README for a GitHub Action. The key features include the following:
- Designed to Run on a Schedule: The intended usage is to run the action on a schedule (e.g., nightly) to update the endpoint.
- Customizable: It is configurable in a number of ways (e.g., badge color, logo, style) using action inputs, but you can also override these things when you embed the badge using Shield's URL parameters.
- Multiple Action Support: For those who maintain multiple GitHub Actions, the count-action-users action accepts a list of GitHub Actions as an input, generating endpoints for all actions in the list. In this way, a single run of the action in a single workflow in a single repository is sufficient to regularly monitor the number of users of all of the actions that you maintain. Or, if you prefer, you can run the action separately within the repositories of each action.
The count-action-users GitHub Action is implemented in Python, and the source code repository is hosted on GitHub; and it is licensed under the MIT License. Also in the GitHub repository you will find detailed instructions for use including several sample GitHub workflows.
The count-action-users GitHub Action is developed by Vincent A. Cicirello. It was originally implemented for my own use in monitoring the several GitHub Actions that I maintain, but I have decided to share it with others.
Live Examples
Because it features the ability to monitor multiple GitHub Actions from a single workflow, I have one live example, which is the workflow for all of my currently maintained GitHub Actions: count-action-users.yml. The JSON endpoints generated by this workflow can be found at the root of this repository: https://github.com/cicirello/endpoints. That repository also contains JSON endpoints for generating other status badges. To inspect one of the relevant JSON files as a sample, consider jacoco-badge-generator.json.