Files
Reticulum-Go/.gitea/workflows/sbom.yml
Sudo-Ivan 82dad74ba8
Some checks failed
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 30s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 29s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 33s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 32s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 35s
Go Revive Lint / lint (push) Failing after 15s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 54s
Run Gosec / tests (push) Successful in 1m2s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m34s
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 9m26s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 9m24s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 9m26s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 9m24s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 9m24s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 9m26s
Go Build Multi-Platform / Create Release (push) Has been skipped
Update CI workflow to switch from 'master' to 'main' branch for SBOM updates
2025-12-29 22:10:09 -06:00

58 lines
1.8 KiB
YAML

name: Generate SBOM
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup Go
uses: https://git.quad4.io/actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.25.5'
- name: Setup Task
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
with:
version: '3.46.3'
- name: Setup environment
run: task setup
- name: Install dependencies
run: task install:ci
- name: Download Trivy
run: |
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Extra/assets/raw/commit/90fdcea1bb71d91df2de6ff2e3897f278413f300/bin/trivy_0.68.2_Linux-64bit.deb
sudo dpkg -i /tmp/trivy.deb || sudo apt-get install -f -y
- name: Generate SBOM
run: |
mkdir -p sbom
trivy fs --format spdx-json --include-dev-deps --output sbom/sbom.spdx.json .
trivy fs --format cyclonedx --include-dev-deps --output sbom/sbom.cyclonedx.json .
- name: Commit and Push Changes
run: |
git config --global user.name "Gitea Action"
git config --global user.email "actions@noreply.quad4.io"
git remote set-url origin https://${{ secrets.GITEA_TOKEN }}@git.quad4.io/${{ github.repository }}.git
git fetch origin main
git checkout main
git add sbom/
git diff --quiet && git diff --staged --quiet || (git commit -m "Auto-update SBOM [skip ci]" && git push origin main)
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}