Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/api-dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
env:
working-directory: ./backend
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_BRANCH: "${{github.ref}}"

steps:
- uses: actions/checkout@v2
Expand All @@ -24,7 +25,7 @@ jobs:
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
dotnet-version: "6.0.x"

- name: Install dependencies
run: dotnet restore
Expand Down Expand Up @@ -115,6 +116,19 @@ jobs:
# The SonarQube server URL. For SonarCloud, skip this setting.
sonarHostname: ${{secrets.SONAR_URL}}

# Send notifications only if MS_TEAMS_NOTIFY_URL secret has been set
- name: Failure notification to Teams Channel
env:
MS_TEAMS_NOTIFY_URL: ${{ secrets.MS_TEAMS_NOTIFY_URL }}
if: env.MS_TEAMS_NOTIFY_URL != '' && failure() && steps.scan.outcome == 'failure' && github.event_name == 'push'
uses: jdcargile/ms-teams-notification@v1.3
with:
github-token: ${{ github.token }}
ms-teams-webhook-uri: ${{ env.MS_TEAMS_NOTIFY_URL }}
notification-summary: PIMS Sonar Scan FAILED in ${{env.GIT_BRANCH}} environment
notification-color: ff0000
timezone: America/Los_Angeles

- name: Find Comment
if: failure() && steps.scan.outcome == 'failure' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/find-comment@v1
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/app-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
env:
CI: true
working-directory: ./frontend
GIT_BRANCH: "${{github.ref}}"

strategy:
matrix:
Expand Down Expand Up @@ -73,6 +74,19 @@ jobs:
-Dsonar.projectName=${{env.PROJECT_NAME}}
-Dsonar.qualitygate.wait=true

# Send notifications only if MS_TEAMS_NOTIFY_URL secret has been set
- name: Failure notification to Teams Channel
env:
MS_TEAMS_NOTIFY_URL: ${{ secrets.MS_TEAMS_NOTIFY_URL }}
if: env.MS_TEAMS_NOTIFY_URL != '' && failure() && steps.scan.outcome == 'failure' && github.event_name == 'push'
uses: jdcargile/ms-teams-notification@v1.3
with:
github-token: ${{ github.token }}
ms-teams-webhook-uri: ${{ env.MS_TEAMS_NOTIFY_URL }}
notification-summary: PIMS Sonar Scan FAILED in ${{env.GIT_BRANCH}} environment
notification-color: ff0000
timezone: America/Los_Angeles

- name: Find Comment
if: failure() && steps.scan.outcome == 'failure' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/find-comment@v1
Expand Down