name: 'generate-sbom'
description: 'Generate SBOM for FreeRTOS libraries'
inputs:
  repo_path:
    description: 'Path to repository folder containing manifest.yml to verify.'
    required: false
    default: ./
  source_path:
    description: 'Path to source code'
    required: false
    default: ./source
runs:
  using: "composite"
  steps:
      - name: Install dependencies
        run: pip install -r $GITHUB_ACTION_PATH/requirements.txt
        shell: bash 
      - name: Run generator script
        working-directory: ${{ inputs.repo_path }}
        run: |
          python3 $GITHUB_ACTION_PATH/scan_dir.py --source-path ${{ inputs.source_path }}
        shell: bash