Skip to content

Alert if upgrade is necessary #48

Alert if upgrade is necessary

Alert if upgrade is necessary #48

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@d632683dd7b4114ad314bca15554477dd762a938
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