Skip to content

Merge pull request #8 from farhadmd7/main #17

Merge pull request #8 from farhadmd7/main

Merge pull request #8 from farhadmd7/main #17

Workflow file for this run

name: pre-commit
on:
push:
branches-ignore:
- 'master'
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"
- uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-
- uses: pre-commit/[email protected]
continue-on-error: true
- name: Commit files
run: |
if [[ `git status --porcelain --untracked-files=no` ]]; then
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "pre-commit" -a
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}