Skip to content

An action for generating reports on how a user or organization is using GitHub Actions.

License

Notifications You must be signed in to change notification settings

imjohnbo/workflow-reports-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
GitHub Actions
Feb 24, 2021
bcbd16b · Feb 24, 2021

History

36 Commits
Nov 25, 2020
Nov 25, 2020
Feb 24, 2021
Nov 25, 2020
Dec 3, 2020
Nov 25, 2020
Nov 25, 2020
Nov 25, 2020
Dec 1, 2020
Nov 25, 2020
Nov 25, 2020
Nov 25, 2020
Nov 25, 2020
Feb 24, 2021
Feb 24, 2021
Nov 25, 2020

Repository files navigation

typescript-action status

Workflow Reports Action

An action for generating reports on how a user or organization (owner) is using GitHub Actions. It parses the workflows of the default branch and produces JSON report artifact that you may download.

Why? So you can:

  • See which actions your org depends on, including versions
  • Get a clickable list of all workflows
  • Gain insight into what triggers your workflows
  • Understand the length and complexity of your workflows

Note: This action is in early stages. Please consider opening an issue for feedback and feature requests. 🙌

Usage

Manual report

on:
  workflow_dispatch:
    inputs:
      owner:
        description: 'Owner of actions to retrieve'
        required: true

name: Generate report

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: imjohnbo/workflow-reports-action@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        owner: octocat # user or org, e.g. octocat or octocat-org

Scheduled report

on:
  # https://crontab.guru/
  schedule:	
  - cron: 0 12 1 * *

name: Generate report

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: imjohnbo/workflow-reports-action@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        owner: octocat-org # user or org, e.g. octocat or octocat-org

Example report

{
    workflows: [
        {
            name: 'My Workflow',
            path: 'https://github.com/path/to/my-workflow.yml',
            triggers: '"push"',
            jobs_count: 1,
            steps_count: 1
        },
        {
            name: 'Test Workflow',
            path:
                'https://github.com/path/to/my-test-workflow.yml',
            triggers: {
                "pull_request": {
                    "types": [
                        "opened",
                        "reopened"
                    ]
                }
            }
        }
    ],
    actions: {
        'actions/checkout@v1': 4,
        'octokit/[email protected]': 1,
        './': 1,
        'actions/setup-node@v1': 2
    }
}

Known limitations

Known limitations:

  • Rate limits with GITHUB_TOKEN could be a problem when generating a report for a larger organization.
    • Workaround: use a Personal Access Token or GitHub App installation access token for a higher limit
  • Only reports on workflows in the default branch

Contributing

Pull requests and feature requests welcome! See CONTRIBUTING.md for more.

License

MIT