-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 932 Bytes
/
check-headers.yml
File metadata and controls
36 lines (30 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
name: Check File Headers
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-headers:
name: Check Python file headers
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Check headers
run: |
python scripts/update_headers.py --check
continue-on-error: false
- name: Provide fix instructions
if: failure()
run: |
echo "::error::Some files are missing proper headers."
echo "To fix this, run: python scripts/update_headers.py"
echo "Then commit the changes."