Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates actions/setup-go to use go-version-file #25089

Merged
merged 1 commit into from Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/acctest-terraform-lint.yml
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand All @@ -41,11 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/changelog.yml
Expand Up @@ -59,11 +59,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/dependencies.yml
Expand Up @@ -64,11 +64,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: go mod
run: |
echo "==> Checking source code with go mod tidy..."
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/documentation.yml
Expand Up @@ -39,11 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/examples.yml
Expand Up @@ -29,11 +29,9 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: go build
run: go build -o terraform-plugin-dir/terraform-provider-aws_v99.99.99_x5 .
- name: override plugin
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/skaff.yml
Expand Up @@ -18,11 +18,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/snapshot.yml
Expand Up @@ -10,11 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down
36 changes: 9 additions & 27 deletions .github/workflows/terraform_provider.yml
Expand Up @@ -34,11 +34,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
id: cache-go-pkg-mod
Expand All @@ -62,12 +60,10 @@ jobs:
with:
path: terraform-plugin-dir
key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
name: go env
Expand Down Expand Up @@ -128,11 +124,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand All @@ -159,11 +153,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand Down Expand Up @@ -195,11 +187,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand Down Expand Up @@ -281,11 +271,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand All @@ -311,11 +299,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand All @@ -340,11 +326,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down Expand Up @@ -376,11 +360,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
# See also: https://github.com/actions/setup-go/issues/54
- name: go env
run: |
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/website.yml
Expand Up @@ -74,11 +74,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand All @@ -91,11 +89,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand All @@ -108,11 +104,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/workflow-lint.yml
Expand Up @@ -12,11 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: Install actionlint
run: cd tools && go install github.com/rhysd/actionlint/cmd/actionlint
- name: Run actionlint on workflow files
Expand Down