<commit_before># Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'secure-setup-terraform action'
description: 'Verify that the installed terraform binary matches a pre-computed hash. Ensure that there is a checked in provider lock file and that it is read only so that terraform cannot update it.'
inputs:
  terraform_version:
    description: 'The terraform version to install'
    default: '1.3.2'
    required: false
  terraform_checksum:
    description: 'The pinned terraform checksum for the specified version'
    required: true

runs:
  using: 'composite'
  steps:
    - name: 'checkout'
      uses: 'actions/checkout@v3'
    - name: 'download-linters'
      shell: 'bash'
      env:
        release_version: '0.0.10'
        release_location: 'https://github.com/bradegler/secure-setup-terraform/releases/tag'
      run: |-
        curl -H "Authorization: token ${{ github.token }}" -O "${{env.release_location}}/v${{env.release_version}}/secure-setup-terraform_${{env.release_version}}_linux_amd64.tar.gz"
        tar xf secure-setup-terraform_${{env.release_version}}_linux_amd64.tar.gz

    # Recursively search for terraform files in the current repo and run a linter that fails when it finds calls to 'local-exec'
    - name: 'lint-local-exec'
      shell: 'bash'
      run: ./lint-local-exec ./

    # Search the .github/workflows for this project and run a linter that fails if it finds a direct call to the 'hashicorp/setup-terraform' action
    - name: 'lint-setup-terraform'
      shell: 'bash'
      run: ./lint-setup-terraform ./.github/workflows

    - name: 'setup-terraform'<commit_msg>updated action to use latest released version<commit_after># Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'secure-setup-terraform action'
description: 'Verify that the installed terraform binary matches a pre-computed hash. Ensure that there is a checked in provider lock file and that it is read only so that terraform cannot update it.'
inputs:
  terraform_version:
    description: 'The terraform version to install'
    default: '1.3.2'
    required: false
  terraform_checksum:
    description: 'The pinned terraform checksum for the specified version'
    required: true

runs:
  using: 'composite'
  steps:
    - name: 'checkout'
      uses: 'actions/checkout@v3'
    - name: 'download-linters'
      shell: 'bash'
      env:
        release_version: '0.0.11'
        release_location: 'https://github.com/bradegler/secure-setup-terraform/releases/tag'
      run: |-
        curl -H "Authorization: token ${{ github.token }}" -O "${{env.release_location}}/v${{env.release_version}}/secure-setup-terraform_${{env.release_version}}_linux_amd64.tar.gz"
        tar xf secure-setup-terraform_${{env.release_version}}_linux_amd64.tar.gz

    # Recursively search for terraform files in the current repo and run a linter that fails when it finds calls to 'local-exec'
    - name: 'lint-local-exec'
      shell: 'bash'
      run: ./lint-local-exec ./

    # Search the .github/workflows for this project and run a linter that fails if it finds a direct call to the 'hashicorp/setup-terraform' action
    - name: 'lint-setup-terraform'
      shell: 'bash'
      run: ./lint-setup-terraform ./.github/workflows

    - name: 'setup-terraform'
{'fraction_non_alphanumeric': 0.0963855421686747, 'fraction_numerical': 0.009267840593141797, 'mean_word_length': 3.5015641293013555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3394264', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1270, 'n_words': 465}