Add documentation automation #7
Workflow file for this run
This file contains 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: pre-commit-terraform | |
on: | |
pull_request: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/antonbabenko/pre-commit-terraform:latest # latest used here for simplicity, not recommended | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- run: | | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Cache pre-commit since we use pre-commit from container | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Execute pre-commit | |
run: | | |
pre-commit run --color=always --show-diff-on-failure --all-files |