Skip to content

Generate SBOM during build/release process #2

Generate SBOM during build/release process

Generate SBOM during build/release process #2

Workflow file for this run

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/learn-github-actions/variables
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
name: SBOM
on:

Check failure on line 6 in .github/workflows/sbom.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sbom.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
 release:
 types: [published]
 permissions: read-all
jobs:
 generate-sbom:
 runs-on: ubuntu-latest
 steps:
 - name: Checkout core repo
 uses: actions/checkout@v4
- name: Setup Python
 uses: actions/setup-python@v5
 with:
python-version: '3.10'
architecture: 'x64'
- name: Install requests
 run: pip install requests
 - name: Generate SBOM
 run: python3 generate_sbom.py
- name: Zip the SBOM file
run: zip sbom.zip opentelemetry-python.spdx.json
 - name: Upload artifact
 uses: actions/upload-artifact@v4
 with:
 name: SBOM.zip
 path: ./sbom.zip
add-release-artifact:
needs: generate-sboms
 runs-on: ubuntu-latest
 permissions:
 contents: write
 steps:
 - name: Download artifact from generate-sboms
 uses: actions/download-artifact@v4
 with:
 name: SBOM.zip
 - name: Upload release asset
 uses: actions/upload-release-asset@v1
 env:
 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 with:
 upload_url: ${{ github.event.release.upload_url }}
 asset_path: ./sbom.zip
 asset_name: SBOM.zip
 asset_content_type: application/zip