Skip to content

Commit

Permalink
SANDBOX-677 use go-version-file (#49)
Browse files Browse the repository at this point in the history
* use go version file instead

* remove go version env var

---------

Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
  • Loading branch information
ranakan19 and MatousJobanek authored Jul 22, 2024
1 parent d758210 commit 5758a64
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest

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: Lint
uses: golangci/golangci-lint-action@v6
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-with-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
name: Test with coverage

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: Cache dependencies
uses: actions/cache@v4
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/user-identity-mapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
GOPATH: /tmp/go
GO_VERSION: 1.20.x
IMAGE_REGISTRY: quay.io
REGISTRY_USER: "codeready-toolchain+push"
REGISTRY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
Expand All @@ -19,16 +18,16 @@ jobs:

runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Cache dependencies
uses: actions/cache@v4
with:
Expand Down

0 comments on commit 5758a64

Please sign in to comment.