diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 31f47c6..d684518 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,98 +12,55 @@ on: env: GOPROXY: https://proxy.golang.org - GOVERSION: 1.21.6 jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make check build: needs: check runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make build test: needs: check runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make test lint: needs: check runs-on: ubuntu-latest - env: - LINT_OPTS: "--timeout 10m" steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make lint coverage: needs: check runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make coverage - uses: codecov/codecov-action@v3 with: @@ -117,16 +74,8 @@ jobs: with: platforms: amd64,arm64 - uses: docker/setup-buildx-action@v2 - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: go.mod - run: make docker e2e diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 90fe5a2..f359c5b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -7,7 +7,6 @@ on: env: GOPROXY: https://proxy.golang.org - GOVERSION: 1.21.6 jobs: publish: @@ -20,10 +19,10 @@ jobs: # Set the RELEASE_TAG to force the version of the Docker images echo "DOCKER_TAG=${GITHUB_REF_NAME}" >> "$GITHUB_ENV" - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVERSION }} - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod - uses: google-github-actions/auth@v1 with: credentials_json: ${{ secrets.GCP_INTERNAL_CONTAINERS_SERVICE_ACCOUNT_KEY }}