Skip to content

Commit bfd20e0

Browse files
authored
Merge pull request #25 from cicsdev/6.1-copyright-action
using new copyright action
2 parents 1aab07d + 7c3caa3 commit bfd20e0

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/java.yaml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,17 @@ on:
88

99
jobs:
1010
check-copyright:
11-
name: Check Copyright
1211
runs-on: ubuntu-latest
12+
name: Check Copyright
1313
steps:
14-
- uses: actions/checkout@v3
15-
16-
- name: Check Copyright
17-
env:
18-
EXTENSIONS: "*.java"
19-
COPYRIGHT_STATEMENT: "/**\n * Copyright IBM Corp. 2025\n */"
20-
run: |
21-
for ext in $EXTENSIONS; do
22-
for file in $(find . -type f -name "$ext" ! -path "cics-java-osgi-link-app/*"); do
23-
if ! grep -q "Copyright" "$file"; then
24-
echo -e "$COPYRIGHT_STATEMENT\n$(cat "$file")" > "$file"
25-
fi
26-
done
27-
done
28-
29-
- name: Create Pull Request
30-
uses: peter-evans/create-pull-request@v7
14+
- uses: actions/checkout@v4
15+
- id: copyright-action
16+
uses: cicsdev/.github/.github/actions/samples-copyright-checker@139edd8dc23af7f4f7dd9afe4d56a1053fe426a7
3117
with:
32-
token: ${{ secrets.GITHUB_TOKEN }}
33-
base: ${{ github.head_ref }}
18+
directory: './cics-java-osgi-link-app/'
19+
file-extensions: '*.java'
20+
base-copyright: 'Copyright IBM Corp. 2025'
21+
token: ${{ secrets.GITHUB_TOKEN }}
3422

3523
build-mvnw:
3624
name: Build Maven Wrapper

0 commit comments

Comments
 (0)