Create SBOMs PR #7
Workflow file for this run
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
# 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: Install devbox | |
uses: jetify-com/[email protected] | |
- 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 | |
devbox run -- 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 " |