Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add github job that reports successful release #2712

Merged
merged 11 commits into from
Sep 14, 2023
56 changes: 55 additions & 1 deletion .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,65 @@ jobs:
!cancelled() &&
github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Extract version
id: extract_version
uses: Saionaro/[email protected]

- name: Send failure message to analytics-internal-bot slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ':small_red_triangle_down: :dashboard-app: Dashboard-app release <https://github.com/dhis2/dashboard-app/actions/workflows/dhis2-verify-app.yml?query=branch%3Amaster+is%3Afailure>'
payload: |
{
"text": ":small_red_triangle_down: :dashboard-app: Dashboard version ${{ steps.extract_version.outputs.version }} release <https://github.com/dhis2/dashboard-app/actions/workflows/dhis2-verify-app.yml?query=branch%3Amaster+is%3Afailure|failed>",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":small_red_triangle_down: :dashboard-app: Dashboard version ${{ steps.extract_version.outputs.version }} release <https://github.com/dhis2/dashboard-app/actions/workflows/dhis2-verify-app.yml?query=branch%3Amaster+is%3Afailure|failed>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

report-release-success:
runs-on: ubuntu-latest
needs: release
if: |
success() &&
!cancelled()
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Extract version
id: extract_version
uses: Saionaro/[email protected]

- name: Send success message to analytics-internal-bot slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"text": ":large_green_circle: :dashboard-app: :tada: Dashboard app release succeeded for version: ${{ steps.extract_version.outputs.version }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":large_green_circle: :dashboard-app: :tada: Dashboard version ${{ steps.extract_version.outputs.version }} released <https://github.com/dhis2/dashboard-app/actions/workflows/dhis2-verify-app.yml?query=branch%3Amaster+is%3Asuccess|successfully>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}