Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into retry_updating_db_with_new_schema
Browse files Browse the repository at this point in the history
  • Loading branch information
x-platformcoder authored Nov 24, 2022
2 parents b2b7c39 + 3e44ef4 commit b2db354
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,8 @@ jobs:

dispatch_deploment_event:
runs-on: ubuntu-latest
needs: [
# Necessary to be able to use its outputs in the dispatch event
changes,
# .NET
dotnet_promote_prerelease,
]
if: |
always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
!(
needs.dotnet_promote_prerelease.result == 'skipped'
)
needs: dotnet_promote_prerelease
steps:
- run: echo "${{ toJSON(needs) }}"

- name: Find associated pull request
uses: Energinet-DataHub/.github/.github/actions/find-related-pr-number@v8
id: find_pull_request
Expand All @@ -85,3 +71,21 @@ jobs:
repository: '${{ secrets.ENVIRONMENT_REPOSITORY_PATH }}'
event-type: 'charges-deployment-request-domain'
client-payload: '{"domain_pr": "${{ steps.find_pull_request.outputs.pull_request_number }}"}'

#
# Send notification to teams channel if deployment dispatch failed
#

dispatch_failed:
needs: [
dotnet_promote_prerelease,
dispatch_deploment_event,
]
if: |
always() &&
contains(needs.*.result, 'failure')
uses: Energinet-DataHub/.github/.github/workflows/notify-team.yml@v9
with:
TEAM_NAME: 'Volt'
SUBJECT: 'Deployment dispatch failed: Charges'
secrets: inherit

0 comments on commit b2db354

Please sign in to comment.