Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Use pre-commit action
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelaw320 committed Apr 9, 2021
1 parent b8f3861 commit 79c4c75
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: Pre-Commit

on: [push, pull_request]
on:
pull_request:
push:
branches: [main]

jobs:
build:

pre-commit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Run pre-commit test
run: |
curl https://pre-commit.com/install-local.py | python3 -
curl -Lo ./terraform-docs https://github.com/terraform-docs/terraform-docs/releases/download/v0.9.1/terraform-docs-v0.9.1-$(uname | tr '[:upper:]' '[:lower:]')-amd64
chmod +x ./terraform-docs
sudo mv ./terraform-docs /usr/bin/terraform-docs
/home/runner/bin/pre-commit --version
terraform-docs --version
/home/runner/bin/pre-commit run -a
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.2

0 comments on commit 79c4c75

Please sign in to comment.