Skip to content

Commit

Permalink
Test CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrocapra committed Sep 29, 2023
1 parent 322965f commit 753a537
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/add-copyright-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Prepend Comments

on:
push:
branches:
- final-comments

jobs:
prepend-comments:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check and Prepend Comments
run: |
for file in $(find . -type d \( -path "./backend/signin-service/src" -o -path "./backend/web/Web.Portal/wwwroot" \) -prune -o -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.cs" \) -print); do
if ! grep -q "Copyright 2023 Quantoz Technology B.V. and contributors." "$file"; then
echo -e "// Copyright 2023 Quantoz Technology B.V. and contributors. Licensed\n// under the Apache License, Version 2.0. See the NOTICE file at the root\n// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0\n\n$(cat $file)" > $file
fi
done
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add -A
if [[ $(git status --porcelain) ]]; then
git commit -m "Prepend comments to source files"
git push
fi

0 comments on commit 753a537

Please sign in to comment.