Skip to content

Commit

Permalink
[CI] Add licence header check
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Mar 21, 2022
1 parent 9d938c8 commit 55a80ce
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,29 @@ jobs:
black_args: "--line-length=120"
flake8: true
flake8_args: "--max-line-length=120"

check-license:
name: Check for License headers
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Python dependencies
run: pip install licenseheaders

- name: Download template file
run: wget https://raw.githubusercontent.com/johann-petrak/licenseheaders/master/templates/apache-2.tmpl

- name: Run check
run: |
licenseheaders -t apache-2.tmpl -y $YEARS -o $OWNER -n MLonMCU -u $URL -d . -E $EXTENSIONS
test -z "$(git status --untracked-files=no --porcelain)" || (echo "Please check your license headers!" ; false) && echo "License check was successful."
env:
OWNER: "TUM Department of Electrical and Computer Engineering"
PROJECT: "MLonMCU"
YEARS: "2022"
URL: "https://github.com/tum-ei-eda/mlonmcu.git"
EXTENSIONS: "py c cpp"
EXCLUDE: ".venv models"

0 comments on commit 55a80ce

Please sign in to comment.