https://github.com/mvdkleijn/licenses-action
A Github Action that downloads and makes available the https://github.com/mvdkleijn/licenses tool.
https://github.com/mvdkleijn/licenses-action
action license license-management licenses licenses-simplified
Last synced: about 1 month ago
JSON representation
A Github Action that downloads and makes available the https://github.com/mvdkleijn/licenses tool.
- Host: GitHub
- URL: https://github.com/mvdkleijn/licenses-action
- Owner: mvdkleijn
- License: mpl-2.0
- Created: 2024-10-09T08:56:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T08:53:34.000Z (3 months ago)
- Last Synced: 2025-05-07T09:13:01.058Z (about 1 month ago)
- Topics: action, license, license-management, licenses, licenses-simplified
- Homepage: https://github.com/marketplace/actions/license-overview-generator
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Licenses Action

A GitHub Action to run the [mvdkleijn/licenses](https://github.com/mvdkleijn/licenses) tool. This allows you to generate
a simple, human readable overview of the licenses mentioned in a provided SBOM.## Features
- **Based on provided SBOM**: Use a provided (CycloneDX) SBOM file in XML or JSON formats.
- **Customizable Output**: Use custom Go template for the report output.
- **Easy Integration**: Integrate seamlessly with your CI/CD workflows.## Inputs
- `sbom` (required): Path to the SBOM file to use.
- `type` (optional): The format of the SBOM file, either `xml` or `json`. Defaults to `xml`.
- `filename` (optional): The filename for the generated report file. Defaults to `licenses.md`.
- `template` (required): Template content used to generate the report.
- `evaluate` (optional): Whether or not to evaluate license compatibility based on the
way [mvdkleijn/licenses](https://github.com/mvdkleijn/licenses) works.## Outputs
- `output`: Path to the generated report file.
## Usage
To use this action in your workflow, add the following step:
```yaml
jobs:
licenses:
runs-on: ubuntu-lateststeps:
- name: Checkout code
uses: actions/checkout@v4- name: Run Licenses Action
uses: mvdkleijn/licenses-action@v1
with:
sbom: sbom.xml
type: xml
filename: licenses.md
template: |
# LicensesThe following third-party licenses are applicable to this project:
{{range .SortedKeys}}## {{.}}
{{range index $.ComponentsByLicense .}}- {{.Name}} ({{.Version}})
{{end}}
{{end}}
evaluate: true
```## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any
changes you would like to make.## License
This software is made available under the [MPL-2.0](https://choosealicense.com/licenses/mpl-2.0/) license.
The full details are available from the [LICENSE](/LICENSE) file.Copyright (C) 2024 Martijn van der Kleijn