Add variant input parameter

This commit is contained in:
Jonathan Tran 2024-05-10 14:28:35 -04:00
parent 5f3240f201
commit a01088e044
2 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,11 @@ inputs:
A comma-separated list of columns to group the BOM by. If not present, the
BOM will be flat.
default: ''
variant:
description: >
The variant of the project to generate the BOM for. If not present, the
BOM will be generated for the default variant.
default: ''
runs:
using: "docker"
image: "Dockerfile"
@ -32,6 +37,8 @@ runs:
- ${{ inputs.columns }}
- "--group_by"
- ${{ inputs.group_by }}
- "--variant"
- ${{ inputs.variant }}
- "--output_file"
- "${{ github.workspace}}/${{ inputs.output_file_name }}"
- ${{ github.repository }}

View File

@ -61,6 +61,7 @@ if __name__ == "__main__":
"The variant of the project to generate the BOM for. If not present, the BOM will be "
"generated for the default variant."
),
default="",
)
args = parser.parse_args()
@ -95,7 +96,7 @@ if __name__ == "__main__":
columns,
group_by=group_by,
ref=args.source_ref,
variant=args.variant,
variant=args.variant if args.variant else None,
)
with ExitStack() as stack: