diff --git a/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml b/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml index d6247f397..6cd5a270e 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml @@ -14,6 +14,12 @@ inputs: dotnet java default: all + cache-go: + description: | + Whether to enable the GitHub cache for Go. Appropriate for disabling in + smaller jobs that typically completely before the "real" job has an + opportunity to populate the cache. + default: "true" runs: using: "composite" @@ -27,6 +33,8 @@ runs: provider/*.sum upstream/*.sum sdk/*.sum + # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. + cache: ${{ inputs.cache-go }} - name: Install pulumictl if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') diff --git a/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml b/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml index f86f4e53a..0e599c1eb 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml @@ -22,6 +22,7 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go + cache-go: false - run: make upstream - uses: pulumi/license-check-action@main with: diff --git a/provider-ci/test-providers/acme/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/acme/.github/actions/setup-tools/action.yml index 0435bfdaa..5b80b7485 100644 --- a/provider-ci/test-providers/acme/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/acme/.github/actions/setup-tools/action.yml @@ -14,6 +14,12 @@ inputs: dotnet java default: all + cache-go: + description: | + Whether to enable the GitHub cache for Go. Appropriate for disabling in + smaller jobs that typically completely before the "real" job has an + opportunity to populate the cache. + default: "true" runs: using: "composite" @@ -27,6 +33,8 @@ runs: provider/*.sum upstream/*.sum sdk/*.sum + # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. + cache: ${{ inputs.cache-go }} - name: Install pulumictl if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') diff --git a/provider-ci/test-providers/acme/.github/workflows/license.yml b/provider-ci/test-providers/acme/.github/workflows/license.yml index 5bfa6aa46..790b1cdcf 100644 --- a/provider-ci/test-providers/acme/.github/workflows/license.yml +++ b/provider-ci/test-providers/acme/.github/workflows/license.yml @@ -37,6 +37,7 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go + cache-go: false - run: make upstream - uses: pulumi/license-check-action@main with: diff --git a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml index 0435bfdaa..5b80b7485 100644 --- a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml @@ -14,6 +14,12 @@ inputs: dotnet java default: all + cache-go: + description: | + Whether to enable the GitHub cache for Go. Appropriate for disabling in + smaller jobs that typically completely before the "real" job has an + opportunity to populate the cache. + default: "true" runs: using: "composite" @@ -27,6 +33,8 @@ runs: provider/*.sum upstream/*.sum sdk/*.sum + # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. + cache: ${{ inputs.cache-go }} - name: Install pulumictl if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') diff --git a/provider-ci/test-providers/aws/.github/workflows/license.yml b/provider-ci/test-providers/aws/.github/workflows/license.yml index 9e1bd1164..7a9fc38eb 100644 --- a/provider-ci/test-providers/aws/.github/workflows/license.yml +++ b/provider-ci/test-providers/aws/.github/workflows/license.yml @@ -40,6 +40,7 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go + cache-go: false - run: make upstream - uses: pulumi/license-check-action@main with: diff --git a/provider-ci/test-providers/cloudflare/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/cloudflare/.github/actions/setup-tools/action.yml index 0435bfdaa..5b80b7485 100644 --- a/provider-ci/test-providers/cloudflare/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/cloudflare/.github/actions/setup-tools/action.yml @@ -14,6 +14,12 @@ inputs: dotnet java default: all + cache-go: + description: | + Whether to enable the GitHub cache for Go. Appropriate for disabling in + smaller jobs that typically completely before the "real" job has an + opportunity to populate the cache. + default: "true" runs: using: "composite" @@ -27,6 +33,8 @@ runs: provider/*.sum upstream/*.sum sdk/*.sum + # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. + cache: ${{ inputs.cache-go }} - name: Install pulumictl if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/license.yml b/provider-ci/test-providers/cloudflare/.github/workflows/license.yml index 5cd805631..560b437bd 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/license.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/license.yml @@ -39,6 +39,7 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go + cache-go: false - run: make upstream - uses: pulumi/license-check-action@main with: diff --git a/provider-ci/test-providers/docker/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/docker/.github/actions/setup-tools/action.yml index 0435bfdaa..5b80b7485 100644 --- a/provider-ci/test-providers/docker/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/docker/.github/actions/setup-tools/action.yml @@ -14,6 +14,12 @@ inputs: dotnet java default: all + cache-go: + description: | + Whether to enable the GitHub cache for Go. Appropriate for disabling in + smaller jobs that typically completely before the "real" job has an + opportunity to populate the cache. + default: "true" runs: using: "composite" @@ -27,6 +33,8 @@ runs: provider/*.sum upstream/*.sum sdk/*.sum + # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. + cache: ${{ inputs.cache-go }} - name: Install pulumictl if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') diff --git a/provider-ci/test-providers/docker/.github/workflows/license.yml b/provider-ci/test-providers/docker/.github/workflows/license.yml index b7be1af42..5bdf60076 100644 --- a/provider-ci/test-providers/docker/.github/workflows/license.yml +++ b/provider-ci/test-providers/docker/.github/workflows/license.yml @@ -52,6 +52,7 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go + cache-go: false - run: make upstream - uses: pulumi/license-check-action@main with: