Skip to content

Create SBOMs PR

Create SBOMs PR #1

Workflow file for this run

# GitHub workflow for creating the SDLC SBOMs PR after a release.
name: Create SBOMs PR
on:
workflow_call:
inputs:
version:
type: string
description: "Version of the image to extract the SBOMs from (without the 'v' prefix)"
required: true
workflow_dispatch:
inputs:
version:
type: string
description: "Version of the image to extract the SBOMs from (without the 'v' prefix)"
required: true
jobs:
sboms:
environment: release
name: Create SBOMs PR
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "${{ github.workspace }}/tools/makejwt/go.mod"
cache: false
- name: Configure Git
run: |
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Create SBOMs branch
env:
BRANCH: version-${{ env.VERSION }}-sboms
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
OS=linux ARCH=amd64 DOCKER_SBOM_PLUGIN_VERSION=0.6.1 ./scripts/get-docker-sbom-plugin.sh
make generate-sboms VERSION=${{ env.VERSION }}
git checkout -b $BRANCH
git add docs/releases
git commit -m "Add SBOMs for version ${{ env.VERSION }}"
git push --set-upstream origin $BRANCH
- name: Create SBOMs PR
uses: ./.github/actions/create-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REVIEWERS: ${{ env.REVIEWERS }}
with:
REVIEWERS: ${{ env.REVIEWERS }}
TITLE_PREFIX: "SBOMs for version "