Skip to content

Commit

Permalink
cicd: inject version into built clairctl binaries
Browse files Browse the repository at this point in the history
Thanks [@leiqi96](https://github.com/leiqi96) for catching this and figuring
it out.

Closes: #1649
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Nov 23, 2022
1 parent 9d1a7aa commit 5a8128c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ jobs:
- name: Unpack and Build
run: |
tar -xz -f ${{steps.download.outputs.download-path}}/clair-${{ needs.config.outputs.version }}.tar.gz --strip-components=1
go build -o "clairctl-${{matrix.goos}}-${{matrix.goarch}}" ./cmd/clairctl
go build\
-trimpath -ldflags="-s -w -X github.com/quay/clair/v4/cmd.Version=${{ needs.config.outputs.version }}"\
-o "clairctl-${{matrix.goos}}-${{matrix.goarch}}"\
./cmd/clairctl
- name: Upload
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 5a8128c

Please sign in to comment.