Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hadifawaz1999 committed Jul 21, 2024
1 parent 8e2d36c commit 1b58fd6
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]
branches:
- main
pull_request_target:
branches:
- main

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Get changed files
uses: tj-actions/changed-files@v44
id: changed-files

- name: List changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'

- name: Local pre-commit
uses: pre-commit/[email protected]
with:
extra_args: flake8 --all-files
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}

0 comments on commit 1b58fd6

Please sign in to comment.