-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcop-docker.yml
More file actions
31 lines (31 loc) · 1.3 KB
/
cop-docker.yml
File metadata and controls
31 lines (31 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# example workflow for Coverity on Polaris in a docker container
name: cop-docker
on:
push:
branches: [ main, master, develop, stage, release ]
workflow_dispatch:
jobs:
coverity-on-polaris:
runs-on: ubuntu-latest
container:
image: maven:latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Polaris Scan
env:
POLARIS_SERVER_URL: ${{ vars.POLARIS_SERVER_URL }}
POLARIS_ACCESS_TOKEN: ${{ secrets.POLARIS_ACCESS_TOKEN }}
POLARIS_PROJECT: ${{ github.event.repository.name }}
POLARIS_ZIP: polaris_cli-linux64.zip
run: |
ls -ld $GITHUB_WORKSPACE
git log -1 --format=%cd --date=iso-strict
git config --global --add safe.directory $GITHUB_WORKSPACE
git log -1 --format=%cd --date=iso-strict
apt update && apt install -y unzip
curl -fLOsS $POLARIS_SERVER_URL/api/tools/$POLARIS_ZIP
unzip -d ${{ runner.temp }} -jo $POLARIS_ZIP && rm -f $POLARIS_ZIP
${{ runner.temp }}/polaris --co project.name=$POLARIS_PROJECT analyze -w
#${{ runner.temp }}/polaris --co project.name=$POLARIS_PROJECT --co project.branch=${{ github.ref_name }} \
# --co project.revision.name=${{ github.sha }} --co project.revision.date=$(git log -1 --format=%cd --date=iso-strict) analyze -w