Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github action version #761

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ builds:
# Further testing before supporting arm
# - arm
- arm64
- main: ./cmd/osv-scanner/
id: osv-scanner-action
binary: osv-scanner-action
env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
- GO111MODULE=on
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
# prettier-ignore
- '-s -w -X github.com/google/osv-scanner/internal/version.OSVVersion={{.Version}}_GHAction -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
goos:
- linux
goarch:
- amd64
- main: ./cmd/osv-reporter/
id: osv-reporter
binary: osv-reporter
Expand Down
3 changes: 2 additions & 1 deletion goreleaser-action.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ RUN apk --no-cache add \
# Allow git to run on mounted directories
RUN git config --global --add safe.directory '*'

# Built binaries provided by goreleaser
WORKDIR /root/
COPY ./osv-scanner ./
COPY ./osv-scanner-action ./osv-scanner
COPY ./osv-reporter ./
COPY ./exit_code_redirect.sh ./

Expand Down
3 changes: 2 additions & 1 deletion pkg/osvscanner/osvscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/google/osv-scanner/internal/output"
"github.com/google/osv-scanner/internal/sbom"
"github.com/google/osv-scanner/internal/semantic"
"github.com/google/osv-scanner/internal/version"
"github.com/google/osv-scanner/pkg/config"
"github.com/google/osv-scanner/pkg/depsdev"
"github.com/google/osv-scanner/pkg/lockfile"
Expand Down Expand Up @@ -922,7 +923,7 @@ func makeRequest(
}

if osv.RequestUserAgent == "" {
osv.RequestUserAgent = "osv-scanner-api"
osv.RequestUserAgent = "osv-scanner-api_v" + version.OSVVersion
}

resp, err := osv.MakeRequest(query)
Expand Down