diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be7ccf9..bae481e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,26 +22,12 @@ jobs: uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version-file: 'go.mod' - - - name: Cache Go modules - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ github.sha }}-${{ hashFiles('**/go.sum', '.golangci.yml') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download dependencies - run: go mod download - - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0 + cache: true - name: Run lint - run: make lint + uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 + with: + version: v2.4.0 - name: Validate schemas and examples run: make validate @@ -66,19 +52,7 @@ jobs: uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version-file: 'go.mod' - - - name: Cache Go modules - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download dependencies - run: go mod download + cache: true - name: Run all tests run: make test-all diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2bf85fe..62c0f6b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -69,6 +69,7 @@ jobs: uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version-file: 'go.mod' + cache: true - name: Setup Pulumi uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 @@ -110,6 +111,7 @@ jobs: uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version-file: 'go.mod' + cache: true - name: Setup Pulumi uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0face3f..3e6623a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version-file: 'go.mod' + cache: true - name: Install cosign uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62