-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding codacy analysis with spotbugs plugin
- Loading branch information
1 parent
b9608c2
commit 20728b6
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Codacy Security Scan | ||
|
||
# set on trigger to run on push to main branch, pull request on any branch, and on a schedule | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
Build-and-Scan: | ||
name: Maven Package and Codacy SAST | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: ['11', '17'] | ||
fail-fast: false | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@main | ||
- name: Remove Example Properties File | ||
run: rm $GITHUB_WORKSPACE/src/main/resources/application_example.properties | ||
- name: Rename Properties File | ||
run: mv $GITHUB_WORKSPACE/src/main/resources/application.properties.j2 $GITHUB_WORKSPACE/src/main/resources/application.properties | ||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Build SprintBoot Application | ||
run: mvn clean package -DskipTests=true | ||
- name: Rename WAR Artifact | ||
run: mv $GITHUB_WORKSPACE/target/Bento-0.0.1.war $GITHUB_WORKSPACE/target/ROOT.war | ||
- name: Run Codacy Analysis CLI | ||
uses: codacy/codacy-analysis-cli-action@master | ||
with: | ||
tool: spotbugs | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
upload: true | ||
max-allowed-issues: 2147483647 | ||
verbose: true | ||
allow-network: true | ||
skip-uncommitted-files-check: true | ||
force-file-permissions: true |