generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 40
50 lines (42 loc) · 1.5 KB
/
alert_version_upgrade.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Alert if upgrade is necessary
on:
workflow_dispatch:
schedule:
- cron: "7 13 * * Mon"
jobs:
alert_version_upgrade:
name: Alert on Version upgrade
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: check for version upgrade
id: PD
shell: pwsh
run: |
./.github/scripts/MetabaseUpgrade/MetabaseApi.ps1
- name: Get Version upgrade Details
id: VersionUpgrade
shell: pwsh
run: |
echo "${env:Versionupdates}" >> Versionupdates.json
- name: JSON to variables
uses: supriyaaddagada/json-to-variables@00f6ff3a5f15f4bc0ed261ea4c8c23147a717a36
with:
filename: 'Versionupdates.json'
prefix: Schedules
- name: Slack Notification
if: ${{ env.Schedules_UpgradeDetails_0_UpgradeRequired == 'true'}}
uses: ./.github/actions/notifications
with:
method: slack
title: Metabase upgrade Notification
message: |
"Staging Metabase Version": "${{ env.Schedules_UpgradeDetails_0_StgVersion }}"
"Production Metabase Version": "${{ env.Schedules_UpgradeDetails_0_PrdVersion }}"
icon-emoji: ':bell:'
channel: prime-devops
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
color: warning