Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 'go install' to install bom
Browse files Browse the repository at this point in the history
Use 'go install' to compile and install bom using the same Go version as
Tetragon to avoid getting this error:

    invalid go version '1.21.1': must match format 1.23

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent committed Sep 30, 2023
1 parent ff23569 commit 4efe28e
Showing 3 changed files with 18 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-clang-image.yaml
Original file line number Diff line number Diff line change
@@ -117,15 +117,18 @@ jobs:
run: |
cosign sign quay.io/${{ github.repository_owner }}/clang@${{ steps.docker_build_release.outputs.digest }}
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'

- name: Install Bom
shell: bash
env:
# renovate: datasource=github-releases depName=kubernetes-sigs/bom
BOM_VERSION: v0.5.1
run: |
curl -L https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux -o bom
sudo mv ./bom /usr/local/bin/bom
sudo chmod +x /usr/local/bin/bom
go install sigs.k8s.io/bom/cmd/bom@${{ env.BOM_VERSION }}
- name: Generate SBOM
shell: bash
9 changes: 6 additions & 3 deletions .github/workflows/build-images-ci.yml
Original file line number Diff line number Diff line change
@@ -73,15 +73,18 @@ jobs:
- name: Install Cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v3.0.5

- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'

- name: Install Bom
shell: bash
env:
# renovate: datasource=github-releases depName=kubernetes-sigs/bom
BOM_VERSION: v0.5.1
run: |
curl -L https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux -o bom
sudo mv ./bom /usr/local/bin/bom
sudo chmod +x /usr/local/bin/bom
go install sigs.k8s.io/bom/cmd/bom@${{ env.BOM_VERSION }}
# main branch pushes
- name: CI Build (main)
10 changes: 6 additions & 4 deletions .github/workflows/build-images-releases.yml
Original file line number Diff line number Diff line change
@@ -87,16 +87,18 @@ jobs:
cosign sign quay.io/${{ github.repository_owner }}/${{ matrix.name }}@${{ steps.docker_build_release.outputs.digest }}
cosign sign quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci@${{ steps.docker_build_release.outputs.digest }}
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'

- name: Install Bom
if: ${{ startsWith(steps.tag.outputs.tag, 'v') }}
shell: bash
env:
# renovate: datasource=github-releases depName=kubernetes-sigs/bom
BOM_VERSION: v0.5.1
run: |
curl -L https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux -o bom
sudo mv ./bom /usr/local/bin/bom
sudo chmod +x /usr/local/bin/bom
go install sigs.k8s.io/bom/cmd/bom@${{ env.BOM_VERSION }}
- name: Generate SBOM
if: ${{ startsWith(steps.tag.outputs.tag, 'v') }}

0 comments on commit 4efe28e

Please sign in to comment.