Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Merge pull request #375 from heiner/point-to-new-repo #314

Merge pull request #375 from heiner/point-to-new-repo

Merge pull request #375 from heiner/point-to-new-repo #314

Workflow file for this run

---
name: Check license
on:
push:
jobs:
check_license:
name: Check license headers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: Check copyright header in added files
shell: bash
run: |
missing=0
if [ -z "${{ steps.changed-files.outputs.added_files }}" ]; then
exit 0
fi
for file in "${{ steps.changed-files.outputs.added_files }}"; do
echo "$file was modified"
if ! egrep -q '(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)' $file; then
echo "Missing copyright header in $file"
missing=$(expr $missing + 1)
fi
done
exit $missing