Skip to content

Commit 463241d

Browse files
committed
copyright action
1 parent 31a3753 commit 463241d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/java.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,31 @@ 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+
18+
- name: Check Copyright
19+
env:
20+
EXTENSIONS: "*.java"
21+
COPYRIGHT_STATEMENT: "/**\n * Copyright IBM Corp. 2025\n */"
22+
run: |
23+
for ext in $EXTENSIONS; do
24+
for file in $(find . -type f -name "$ext" ! -path "cics-java-osgi-jdbc-app/*"); do
25+
if ! grep -q "Copyright" "$file"; then
26+
echo -e "$COPYRIGHT_STATEMENT\n$(cat "$file")" > "$file"
27+
fi
28+
done
29+
done
30+
31+
- name: Create Pull Request
32+
uses: peter-evans/create-pull-request@v7
33+
with:
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
base: ${{ github.head_ref }}
36+
1237
build-mvnw:
1338
name: Build Maven Wrapper
1439

0 commit comments

Comments
 (0)