Skip to content

Commit

Permalink
use go version file (#1060)
Browse files Browse the repository at this point in the history
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
  • Loading branch information
3 people authored Jul 24, 2024
1 parent eb5b0c0 commit af78831
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci-golang-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
name: GolangCI Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

go-version-file: go.mod

- name: generate
run: |
make generate
Expand All @@ -38,14 +38,14 @@ jobs:
name: Generate SBOM
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

go-version-file: go.mod

- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/operator-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- '*.*'
env:
GOPATH: /tmp/go
GO_VERSION: 1.20.x

jobs:
binary:
Expand All @@ -24,7 +23,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Cache dependencies
uses: actions/cache@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish-operators-for-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
GOPATH: /tmp/go
GO_VERSION: 1.20.x

jobs:
binary:
Expand Down Expand Up @@ -49,7 +48,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Cache dependencies
uses: actions/cache@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-with-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:
name: Test with Coverage
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0


- name: Install Go
uses: actions/setup-go@v5
with:
go-version file: go.mod

- name: generate
run: |
make generate
Expand Down

0 comments on commit af78831

Please sign in to comment.