Difference between revisions of "Uses: pre-commit/action"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
  
 
== Official example ==
 
== Official example ==
<pre>
+
name: pre-commit
name: pre-commit
+
 
+
on:
on:
+
  pull_request:
  pull_request:
+
  push:
  push:
+
    branches: [main]
    branches: [main]
+
 
+
jobs:
jobs:
+
  pre-commit:
  pre-commit:
+
    runs-on: ubuntu-latest
    runs-on: ubuntu-latest
+
    steps:
    steps:
+
    - uses: [[actions/checkout]]@v3
    - uses: actions/checkout@v3
+
    - uses: [[actions/setup-python]]@v3
    - uses: actions/setup-python@v3
+
    - uses: pre-commit/[email protected]
    - uses: pre-commit/[email protected]
 
</pre>
 
  
 
== See also ==
 
== See also ==

Revision as of 09:41, 6 April 2023


Official example

name: pre-commit

on:
  pull_request:
  push:
    branches: [main]

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

See also

Advertising: