Skip to content

Commit d6607a0

Browse files
committed
Copyright Action.
1 parent 1b594ab commit d6607a0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/java.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@ on:
99
- cron: '0 0 * * *'
1010

1111
jobs:
12+
check-copyright:
13+
name: Check Copyright
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Check Copyright
18+
env:
19+
EXTENSIONS: "*.java"
20+
COPYRIGHT_STATEMENT: "/**\n * Copyright IBM Corp. 2016\n */"
21+
run: |
22+
for ext in $EXTENSIONS; do
23+
for file in $(find . -type f -name "$ext" ! -path "cics-java-liberty-link-app/*"); do
24+
if ! grep -q "Copyright" "$file"; then
25+
echo -e "$COPYRIGHT_STATEMENT\n$(cat "$file")" > "$file"
26+
fi
27+
done
28+
done
29+
- name: Create Pull Request
30+
uses: peter-evans/create-pull-request@v7
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
base: ${{ github.head_ref }}
34+
1235
build-mvnw:
1336
name: Build Maven Wrapper
1437

0 commit comments

Comments
 (0)