Fix pre-commit workflow: add terraform installation step #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: FuchiCorp Source Code Checks! | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '*' # matches every branch that doesn't contain a '/' | |
| - '*/*' # matches every branch containing a single '/' | |
| - '**' # matches every branch | |
| jobs: | |
| required-pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: | | |
| wget "https://releases.hashicorp.com/terraform/1.5.7/terraform_1.5.7_linux_amd64.zip" | |
| unzip "terraform_1.5.7_linux_amd64.zip" | |
| sudo mv terraform /usr/bin/terraform && chmod +x /usr/bin/terraform | |
| shell: bash | |
| - uses: actions/setup-python@v3 | |
| - run: python -m pip install pre-commit==2.17.0 shellcheck-py==0.8.0.3 | |
| shell: bash | |
| - run: python -m pip freeze --local | |
| shell: bash | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Commit and push minor fixes by pre-commit | |
| run: | | |
| pre-commit run --show-diff-on-failure --color=always --all-files | |
| shell: bash | |
| working-directory: ${{ github.workspace }} |