Skip to content

Commit

Permalink
🌱 Fixes the golang version
Browse files Browse the repository at this point in the history
Hopefully this fixes the make linter failures

https://github.com/ossf/scorecard/runs/5834278035?check_suite_focus=true

I noticed while trying to debug , which was using go 1.18 in the
workflow log.

Which made me decide to pin it to specific version of go 1.17.7
```
go env -w GOFLAGS=-mod=mod
  make check-linter
  shell: /usr/bin/bash -e {0}
  env:
    PROTOC_VERSION: 3.17.3
    GOROOT: /opt/hostedtoolcache/go/1.18.0/x64
```

Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Apr 5, 2022
1 parent b42a175 commit 761bb4e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
paths-ignore:
- "*.md"

env:
GO_VERSION: 1.17.7

jobs:
scorecard:
name: scorecard-docker
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make scorecard-docker
cron-controller:
Expand Down Expand Up @@ -111,7 +114,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make cron-controller-docker
cron-worker:
Expand Down Expand Up @@ -153,7 +156,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make cron-worker-docker
cron-cii-worker:
Expand Down Expand Up @@ -195,7 +198,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make cron-cii-worker-docker
cron-bq-transfer:
Expand Down Expand Up @@ -237,7 +240,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make cron-bq-transfer-docker
cron-webhook:
Expand Down Expand Up @@ -279,7 +282,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: docker build
run: make cron-webhook-docker
cron-github-server:
Expand Down
39 changes: 20 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:

env:
PROTOC_VERSION: 3.17.3
GO_VERSION: 1.17.7

jobs:
unit-test:
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run unit-tests
run: make unit-test
- name: Upload codecoverage
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: generate mocks
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -147,7 +148,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: generate docs
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -191,7 +192,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build-proto
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -236,7 +237,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run build
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -281,7 +282,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build cron
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -326,7 +327,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build worker
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -371,7 +372,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build cii-worker
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -416,7 +417,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build shuffler
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -461,7 +462,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build bq transfer
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -506,7 +507,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build bq transfer
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -551,7 +552,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build webhook
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -596,7 +597,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build-add-script
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -641,7 +642,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build-validate-script
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -686,7 +687,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: build-validate-script
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -730,7 +731,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run build
run: |
go env -w GOFLAGS=-mod=mod
Expand Down Expand Up @@ -765,7 +766,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run build
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -809,7 +810,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run build
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down Expand Up @@ -849,7 +850,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
with:
go-version: '^1.17'
go-version: ${{ env.GO_VERSION }}
- name: Run build
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c
with:
Expand Down

0 comments on commit 761bb4e

Please sign in to comment.