diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index c826063..c3a7b87 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -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 diff --git a/.github/workflows/test-with-coverage.yml b/.github/workflows/test-with-coverage.yml index b23d103..9eed978 100644 --- a/.github/workflows/test-with-coverage.yml +++ b/.github/workflows/test-with-coverage.yml @@ -19,11 +19,6 @@ 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: @@ -31,6 +26,11 @@ jobs: 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: diff --git a/.github/workflows/user-identity-mapper.yml b/.github/workflows/user-identity-mapper.yml index 544405b..6cae891 100644 --- a/.github/workflows/user-identity-mapper.yml +++ b/.github/workflows/user-identity-mapper.yml @@ -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 }} @@ -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: