Skip to content

Update main.yaml

Update main.yaml #4

Workflow file for this run

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
cd spotbugs-4.7.3/
cd bin
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()