Skip to content

Commit

Permalink
cicd: don't checkout source on clairctl builds
Browse files Browse the repository at this point in the history
The presence of a `.git` directory messes with the new go toolchain vcs
tooling, and we don't actually want a source checkout, anyway.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Jun 26, 2023
1 parent 9d58dba commit 58c26f4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,22 @@ jobs:
GOOS: ${{matrix.goos}}
GOARCH: ${{matrix.goarch}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch Artifacts
uses: actions/download-artifact@v3
id: download
with:
name: release
- uses: ./.github/actions/go-cache
with:
go: ${{ needs.config.outputs.build_go_version }}
- name: Unpack and Build
- name: Unpack
run: |
tar -xz -f ${{steps.download.outputs.download-path}}/clair-${{ needs.config.outputs.version }}.tar.gz --strip-components=1
- uses: actions/setup-go@v4
with:
go-version: ${{ needs.config.outputs.build_go_version }}
- name: Build
# Build with path trimming, ELF debug stripping, and no VCS injection (should be done by the `git archive` process).
run: |
go build\
-trimpath -ldflags="-s -w"\
-trimpath -ldflags="-s -w" -buildvcs=false\
-o "clairctl-${{matrix.goos}}-${{matrix.goarch}}"\
./cmd/clairctl
- name: Upload
Expand Down

0 comments on commit 58c26f4

Please sign in to comment.