Skip to content

Generate references for actions and workflows #53

Generate references for actions and workflows

Generate references for actions and workflows #53

name: Pre-Commit Check
on:
pull_request:
jobs:
pre-commit-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Check if pre-commit ran locally
run: |
# if git rev-parse --verify ${{ github.ref }} >/dev/null 2>&1; then
# # if git rev-parse --verify HEAD >/dev/null 2>&1; then
# echo "Checking if pre-commit ran locally..."
# if [ -f .pre_commit_ran ]; then
# echo "Pre-commit checks were run locally."
# else
# echo "Pre-commit checks were not run locally. Please run 'pre-commit run --all-files' before pushing."
# exit 1
# fi
# else
# echo "This is not a push to a branch. Skipping pre-commit check."
# fi
pre-commit run