mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: FreeRTOS-Header-Checker
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
header-checker:
|
|
name: File Header Checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Install python 3
|
|
- name: Tool Setup
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8.5
|
|
architecture: x64
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Get latest checks from main
|
|
- name: Checkout FreeRTOS Tools
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: FreeRTOS/FreeRTOS
|
|
ref: main
|
|
path: tools
|
|
|
|
# Checkout user pull request changes
|
|
- name: Checkout Pull Request
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
path: inspect
|
|
|
|
# Collect all affected files
|
|
- name: Collecting changed files
|
|
uses: lots0logs/gh-action-get-changed-files@2.1.4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Run checks
|
|
- name: Check File Headers
|
|
run: |
|
|
cd inspect
|
|
../tools/.github/scripts/check-header.py --kernel --json ${HOME}/files.json
|
|
exit $?
|
|
|