Fix Syft URL #19
Workflow file for this run
This file contains hidden or 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
name: Build and release workflow | |
on: | |
push: | |
tags: | |
- "*" # triggers only if push new tag version, like `0.8.4` or else | |
jobs: | |
build-rmap: | |
name: Build and release rmap | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: cli | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.24.1 | |
- name: Generate sbom | |
run: | | |
wget -qO- "https://github.com/anchore/syft/releases/download/v1.21.0/syft_1.21.0_linux_amd64.tar.gz" | \ | |
tar --extract --gzip --file=- syft && \ | |
chmod +x syft | |
./syft dir:. -o spdx-json > sbom.spdx.json | |
rm syft | |
shell: bash | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6.0.0 | |
with: | |
version: latest | |
workdir: cli | |
args: release --config .goreleaser.yml --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} | |
build-reconmapd: | |
name: Build and release reconmapd | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: agent | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.24.1 | |
- name: Generate sbom | |
run: | | |
wget -qO- "https://github.com/anchore/syft/releases/download/v1.21.0/syft_1.21.0_linux_amd64.tar.gz" | \ | |
tar --extract --gzip --file=- syft && \ | |
chmod +x syft | |
./syft dir:. -o spdx-json > sbom.spdx.json | |
rm syft | |
shell: bash | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6.0.0 | |
with: | |
version: latest | |
workdir: agent | |
args: release --config .goreleaser.yml --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} |