ghadg is a command line tool that can list all downstream GitHub Actions dependencies used by a GitHub Actions workflow.
go install github.com/tom0794/github-actions-dependency-graph/cmd/ghadg@latestProvide a path to a workflow yaml/yml file or a directory containing one more more workflow files. By default, the path .github/worfklows/ is used. The output can be configured to be logged or saved to a file.
Usage:
ghadg [workflow-path] [flags]Examples:
# Run with a single workflow
ghadg .github/workflows/ci.yaml
# Run on all workflows located in .github/workflows/
ghadg .github/workflows/
# Output results to a file called results
ghadg --output results .github/workflows/ci.yamlFlags:
-h, --help help for ghadg
-o, --output string Filepath to save the output graph. If not set, the graph is printed to stdout.
-v, --verbose count Increase verbosity (-v = debug, -vv = trace). By default only info, warnings and errors are shown.
The resulting output will list all reusable workflows and actions used by the jobs in the input workflow(s).
tests\workflows\basic-validation.yml/
└── call-basic-validation/
└── actions/reusable-workflows/.github/workflows/basic-validation.yml@main
└── build/
├── actions/checkout@v5
└── actions/setup-node@v4
tests\workflows\ci.yaml/
├── build-and-publish/
│ └── actions/checkout@v4
├── test/
└── release/
└── actions/upload-artifact@v3