ci: Add github actions for validation and release #1
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 | |
on: | |
push: | |
branches: ["*"] | |
jobs: | |
pre-commit: | |
permissions: read-all | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/antonbabenko/pre-commit-terraform:v1.86.0 | |
steps: | |
- name: Install job dependencies | |
run: apk add tar git | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: pre-commit | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Ensure cache directories | |
run: | | |
mkdir -p ~/.cache/pip | |
mkdir -p ~/.cache/pre-commit | |
- name: Run pre-commit-hooks | |
run: | | |
git config --global --add safe.directory $PWD | |
pre-commit run --all-files --color=always --show-diff-on-failure |