From 9a85fca952f72ea89c361d33994a380252d4dc96 Mon Sep 17 00:00:00 2001 From: John Kjell Date: Mon, 5 Feb 2024 09:17:48 -0600 Subject: [PATCH] Add explicit setup-go action for workflows and change attestation file output to backwards compatible Signed-off-by: John Kjell --- .github/workflows/codeql.yml | 4 ++++ .github/workflows/golangci-lint.yml | 3 +++ cmd/run.go | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 65179aa8..e071a643 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -48,6 +48,10 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: 1.21.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 09b876c8..1c56544a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,6 +16,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: 1.21.x - name: golangci-lint uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 with: diff --git a/cmd/run.go b/cmd/run.go index 603a8611..a78c34b6 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -139,9 +139,8 @@ func runRun(ctx context.Context, ro options.RunOptions, args []string, signers . // TODO: Find out explicit way to describe "prefix" in CLI options outfile := ro.OutFilePath if result.AttestorName != "" { - outfile += "-" + result.AttestorName + outfile += "-" + result.AttestorName + ".json" } - outfile += ".json" out, err := loadOutfile(outfile) if err != nil {