Generate Guide #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Guide | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
document_type: | |
description: 'Select the type of guide to generate' | |
required: true | |
default: 'SBOM' | |
type: choice | |
options: | |
- Attestations | |
- CBOM | |
- HBOM | |
- MBOM | |
- ML-BOM | |
- OBOM | |
- SaaSBOM | |
- SBOM | |
- VEX_VDR | |
jobs: | |
build_and_run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
run: docker build -t cdx-guides-builder . | |
- name: Create output directory | |
run: mkdir -p docs | |
- name: Run Docker container | |
run: docker run -e CLOUDCONVERT_API_KEY=${{ secrets.CLOUDCONVERT_API_KEY }} -v $(pwd)/docs:/workspace/docs cdx-guides-builder ${{ github.event.inputs.document_type }} | |
- name: List files in docs directory | |
run: ls -l docs | |
- name: Upload .docx and .pdf files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/** |