@@ -17,7 +17,7 @@ concurrency:
1717jobs:
1818 codeql:
1919 name: CodeQL
20- if: github.event_name != 'pull_request' || ! github.event.pull_request.draft
20+ if: ${{ ! github.event.pull_request.draft }}
2121 runs-on: ubuntu-22.04
2222 timeout-minutes: 5
2323 steps:
3434 # https://github.com/marketplace/actions/aqua-security-trivy
3535 trivy:
3636 name: Trivy Security Scan
37- if: github.event_name != 'pull_request' || ! github.event.pull_request.draft
37+ if: ${{ ! github.event.pull_request.draft }}
3838 runs-on: ubuntu-22.04
3939 timeout-minutes: 1
4040 steps:
5656
5757 tests:
5858 name: Tests
59- if: github.event_name != 'pull_request' || ! github.event.pull_request.draft
59+ if: ${{ ! github.event.pull_request.draft }}
6060 runs-on: ubuntu-22.04
6161 timeout-minutes: 5
6262 services:
7676 dir: [backend, frontend]
7777 include:
7878 - dir: backend
79- sonar_projectKey: quickstart-openshift_backend
8079 token: SONAR_TOKEN_BACKEND
81- triggers: ('backend/')
8280 - dir: frontend
83- sonar_projectKey: quickstart-openshift_frontend
8481 token: SONAR_TOKEN_FRONTEND
85- triggers: ('frontend/')
8682 steps:
8783 - uses: bcgov-nr/action-test-and-analyse@v1.1.0
8884 with:
9490 sonar_args: >
9591 -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
9692 -Dsonar.organization=bcgov-sonarcloud
97- -Dsonar.projectKey=${{ matrix.sonar_projectKey }}
93+ -Dsonar.projectKey=quickstart-openshift_ ${{ matrix.dir }}
9894 -Dsonar.sources=src
9995 -Dsonar.tests.inclusions=**/*spec.ts
10096 -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
10197 sonar_token: ${{ secrets[matrix.token] }}
102- triggers: ${{ matrix.triggers }}
98+ triggers: ('${{ matrix.dir }}/')
99+
100+ results:
101+ name: Results
102+ needs: [codeql, trivy, tests]
103+ runs-on: ubuntu-22.04
104+ timeout-minutes: 1
105+ steps:
106+ - run: echo "Success!"
0 commit comments