Update main.yaml #3
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: Java # workflow name | |
on: | |
push: | |
branches: # similar to "only" in GitLab | |
- master | |
jobs: | |
sast_spotbugs: | |
runs-on: ubuntu-20.04 # similar to "image" in GitLab | |
steps: | |
- run: | | |
wget https://github.com/spotbugs/spotbugs/releases/download/4.7.3/spotbugs-4.7.3.zip | |
unzip spotbugs-4.7.3.zip | |
echo -e "\nexport PATH=\$PATH:/spotbugs-4.7.3/bin" >> ~/.bashrc | |
source ~/.bashrc | |
ls | |
chmod +x /spotbugs-4.7.3/bin/spotbugs | |
apt update && apt install default-jdk -y | |
- uses: actions/checkout@v2 | |
- run: | | |
spotbugs -xml -output spotbugs-output.xml . | |
continue-on-error: true | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: spotBugs | |
path: spotbugs-output.xml | |
if: always() |