1
1
mirror of https://github.com/cqfn/eo.git synced 2024-10-04 04:07:19 +03:00

copyrights

This commit is contained in:
Yegor Bugayenko 2024-06-07 13:02:14 +03:00
parent 96afc112f1
commit c623bc3c5c
No known key found for this signature in database
GPG Key ID: B8283801026E65F3

View File

@ -20,42 +20,29 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
name: license
on:
name: copyrights
'on':
push:
pull_request:
jobs:
license:
copyrights:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: yegor256/copyrights-action@0.0.4
with:
fetch-depth: 0
- run: |
set -e
find . -type f \( \
-name "LICENSE.*" \
-o -name "*.sh" \
-o -name "*.yml" \
-o -name "*.yaml" \
-o -name "*.eo" \
-o -name "*.xmir" \
-o -name "*.xml" \
-o -name "*.xsl" \
-o -name "*.xsd" \
-o -name "*.ini" \
-o -name "*.java" \
-o -name "*.g4" \
-o -name "*.properties" \
-o -name "*.groovy" \) > files.txt
header="Copyright (c) 2016-$(date +%Y) Objectionary.com"
failed="false"
while IFS= read -r file; do
if ! grep -q "$header" "$file"; then
failed="true"
echo "No license in: $file"
fi
done < files.txt
if [ "${failed}" == "true" ]; then
exit 1
fi
globs: >-
**/LICENSE.txt
**/*.sh
**/*.yml
**/*.yaml
**/*.eo
**/*.xmir
**/*.xml
**/*.xsl
**/*.xsd
**/*.ini
**/*.java
**/*.g4
**/*.properties
**/*.groovy