Skip to content

Commit

Permalink
Merge pull request #29746 from hashicorp/gha-pin-actions-cache-to-sha
Browse files Browse the repository at this point in the history
Replace version pinning of actions/cache to its SHA
  • Loading branch information
jar-b authored Mar 13, 2023
2 parents 7e6e329 + 8c548e3 commit 3dd238f
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/acctest-terraform-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down Expand Up @@ -49,13 +49,13 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
name: Cache plugin dir
continue-on-error: true
timeout-minutes: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
Expand All @@ -32,7 +32,7 @@ jobs:
- name: install tflint
run: cd .ci/tools && go install github.com/terraform-linters/tflint

- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
name: Cache plugin dir
with:
path: ~/.tflint.d/plugins
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -61,7 +61,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/providerlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
go-version-file: go.mod
- name: go env
run: echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -50,13 +50,13 @@ jobs:
go-version-file: go.mod
- name: go env
run: echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/skaff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
- name: go env
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/terraform_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
id: cache-go-pkg-mod
timeout-minutes: 2
Expand All @@ -52,7 +52,7 @@ jobs:
runs-on: [custom, linux, medium]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
id: cache-terraform-plugin-dir
timeout-minutes: 2
Expand All @@ -69,12 +69,12 @@ jobs:
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
uses: actions/cache@v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
uses: actions/cache@v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
Expand All @@ -95,13 +95,13 @@ jobs:
- name: go env
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand Down Expand Up @@ -129,13 +129,13 @@ jobs:
- name: go env
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -156,13 +156,13 @@ jobs:
- name: go env
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -186,13 +186,13 @@ jobs:
- name: go env
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -207,15 +207,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
id: cache-terraform-providers-schema
timeout-minutes: 2
with:
path: terraform-providers-schema
key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure'
uses: actions/cache@v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
timeout-minutes: 2
with:
path: terraform-plugin-dir
Expand Down Expand Up @@ -245,14 +245,14 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: cd .ci/tools && go install github.com/bflad/tfproviderdocs
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
timeout-minutes: 2
with:
path: terraform-providers-schema
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: .ci/tools/go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -95,7 +95,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: .ci/tools/go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -113,7 +113,7 @@ jobs:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version-file: .ci/tools/go.mod
- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
continue-on-error: true
timeout-minutes: 2
with:
Expand All @@ -123,7 +123,7 @@ jobs:
- run: cd .ci/tools && go install github.com/katbyte/terrafmt
- run: cd .ci/tools && go install github.com/terraform-linters/tflint

- uses: actions/cache@v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
name: Cache plugin dir
with:
path: ~/.tflint.d/plugins
Expand Down

0 comments on commit 3dd238f

Please sign in to comment.