From c3b4df03fc5073d3ce50dcd80a28de99e631a3ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:30:40 +0000 Subject: [PATCH 1/2] Update actions/setup-go action to v5 --- .github/workflows/lint.yaml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9c84d8f..47e3470 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - name: Determine Go version from go.mod run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - uses: actions/cache@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8a34d4..1487435 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: fetch-depth: 0 - name: Determine Go version from go.mod run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - uses: actions/cache@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e085392..0ba244e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - name: Determine Go version from go.mod run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - uses: actions/cache@v3 From 9d826f003af861546c6a66d450ef2c25aa930e3f Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Mon, 22 Jul 2024 12:34:58 +0200 Subject: [PATCH 2/2] Always use latest go minor; use `setup-go` internal cache --- .github/workflows/lint.yaml | 11 ++++------- .github/workflows/release.yml | 11 ++++------- .github/workflows/test.yml | 11 ++++------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 47e3470..dd3f8f0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -13,16 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Run linters run: make lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1487435..be299bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,17 +12,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Login to Quay.io uses: docker/login-action@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ba244e..c2ff3e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,17 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Run tests run: make test # - name: Upload code coverage report to Code Climate