Skip to content

Show paths

Show paths #8

Workflow file for this run

---
name: Run PreCommit
on:
# pull_request:
# types: [opened, synchronize, reopened, ready_for_review]
push:
path:
.github
jobs:
pre-commit:
# if: github.event.pull_request.draft == false
name: pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Open Tofu
run: |
curl --proto '=https' --tlsv1.2 \
-fsSL https://get.opentofu.org/install-opentofu.sh \
-o install-opentofu.sh
chmod +x install-opentofu.sh
./install-opentofu.sh --install-method deb
rm -f install-opentofu.sh
- name: Install precommit
run: |
python -m pip install pre-commit
- name: Install hooks
run: |
pre-commit install --install-hooks
- name: Init providers
run: |
l=$(find . -maxdepth 1 -type d -name "./[a-z]*")
for i in ${l[@]} ;do echo $i; tofu init $i; done
- name: Run Pre-Commit
run: >
pre-commit run
--all-files
--show-diff-on-failure
-v