copyright action #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: ["cicsts/v5.5"] | |
pull_request: | |
branches: ["cicsts/v5.5"] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
check-copyright: | |
name: Check Copyright | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Copyright | |
env: | |
EXTENSIONS: "*.java, *.js" | |
COPYRIGHT_STATEMENT: "/**\n * Copyright IBM Corp. 2024\n */" | |
run: | | |
for ext in $EXTENSIONS; do | |
for file in $(find . -type f -name "$ext" ! -path "cics-java-liberty-jdbc-web/*"); do | |
if ! grep -q "Copyright" "$file"; then | |
echo -e "$COPYRIGHT_STATEMENT\n$(cat "$file")" > "$file" | |
fi | |
done | |
done | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
base: ${{ github.head_ref }} | |
build-mvnw: | |
name: Build Maven Wrapper | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
jdk: [8, 11, 17, 21] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.jdk }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: "semeru" | |
cache: maven | |
- name: Build with Maven | |
run: ./mvnw --batch-mode --update-snapshots --file pom.xml -Djava.version=${{ matrix.jdk }} verify | |
build-gradlew: | |
name: Build Gradle Wrapper | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
jdk: [8, 11, 17, 21] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.jdk }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'semeru' | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: 8.6 | |
- name: Build with Gradle | |
run: ./gradlew clean build -Pjava_version=${{ matrix.jdk }} |