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

When no go version is provided it will read it from the go.mod file #35

Merged
Merged
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
13 changes: 10 additions & 3 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
required: false
type: string
description: Version of Go used to compile the application
default: 1.17.0
default: ""
secrets:
slackWebhookURL:
required: true
Expand All @@ -36,17 +36,24 @@ jobs:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
repository: ${{ inputs.repo }}
ref: ${{ inputs.branch }}

# Backwards compatibility, when no version is provided it will use the go.mod file version
- name: Set up Go
uses: actions/setup-go@v2
if: inputs.goVersion != ''
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.goVersion }}
- name: Set up Go
if: inputs.goVersion == ''
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build the ${{ inputs.tool }} binary file
run: |
Expand Down
Loading