Merge pull request #8 from paunofu/patch-1 #78
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: [main, master] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install -y hunspell-ca libcurl4-openssl-dev | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Run pre-commit | |
uses: pre-commit/[email protected] | |
- uses: pre-commit-ci/[email protected] | |
if: always() | |
## pre-commit-ci/lite alternative: | |
# - name: Commit files | |
# if: failure() && startsWith(github.ref, 'refs/heads') | |
# run: | | |
# if [[ `git status --porcelain --untracked-files=no` ]]; then | |
# git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
# git config --local user.name "github-actions[bot]" | |
# git checkout -- .github/workflows | |
# git commit -m "pre-commit" -a | |
# fi | |
# - name: Push changes | |
# if: failure() && startsWith(github.ref, 'refs/heads') | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: ${{ github.ref }} | |
env: | |
RENV_CONFIG_CACHE_ENABLED: FALSE | |
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |