Skip to content

docs: Add local usage instructions to README #161

docs: Add local usage instructions to README

docs: Add local usage instructions to README #161

Workflow file for this run

---
name: "Release"
on:
workflow_dispatch:
pull_request_target:
types: [closed]
branches: [main]
jobs:
release:
permissions:
contents: write
pull-requests: read
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e
with:
publish: true
release-config-name: release-drafter.yml
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
release_image:
needs: release
permissions:
contents: read
packages: write
id-token: write
attestations: write
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-image.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e
with:
image-name: ${{ github.repository }}
full-tag: ${{ needs.release.outputs.full-tag }}
short-tag: ${{ needs.release.outputs.short-tag }}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-registry: ghcr.io
image-registry-username: ${{ github.actor }}
image-registry-password: ${{ secrets.GITHUB_TOKEN }}
goreleaser:
needs: release
runs-on: ubuntu-latest
permissions:
attestations: write
contents: write
id-token: write
outputs:
attestation_matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
- name: Install Syft
uses: anchore/sbom-action/download-syft@57aae528053a48a3f6235f2d9461b05fbcb7366d
with:
syft-version: v1.33.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v4
with:
subject-checksums: dist/checksums.txt
- name: Generate attestation matrix
id: generate_matrix
run: |
matrix=$(ls dist/*.spdx.json | jq -R '{"sbom": ., "archive": sub("\\.spdx\\.json$"; "")}' | jq -s -c '{"include": .}')
echo "matrix=$matrix" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: dist
path: dist
attest-sboms:
needs: goreleaser
runs-on: ubuntu-latest
permissions:
attestations: write
id-token: write
strategy:
matrix: ${{ fromJson(needs.goreleaser.outputs.attestation_matrix) }}
steps:
- name: Download artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
with:
name: dist
path: dist
- name: Attest SBOM
uses: actions/attest-sbom@07e74fc4e78d1aad915e867f9a094073a9f71527
with:
subject-path: "${{ matrix.archive }}"
sbom-path: "${{ matrix.sbom }}"