From c8b4985d829730a64cd23ed8422d2c0200d2ec09 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 31 Jan 2025 03:01:18 +0100 Subject: [PATCH] IOS-8741: Add support for build cancellation (Beta/RC builds) Signed-off-by: Andrey Fedorov --- .github/workflows/build-deploy-beta.yml | 22 ++++++++++++++++++++++ .github/workflows/build-deploy-release.yml | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/.github/workflows/build-deploy-beta.yml b/.github/workflows/build-deploy-beta.yml index 9585d75ebf..0310376bec 100644 --- a/.github/workflows/build-deploy-beta.yml +++ b/.github/workflows/build-deploy-beta.yml @@ -239,3 +239,25 @@ jobs: build_description: '${{ inputs.build_description }}' secrets: SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' + + cancel_notification: + name: Cancel Notification + if: cancelled() + uses: tangem/actions/.github/workflows/notification.yml@feature/IOS-8741_ci_cd_notifications + needs: + - prepare + - build + - deploy + - build_notification + with: + channel: '${{ vars.SLACK_CHANNEL_DEPLOYMENTS_IOS }}' + message_ts: '${{ needs.build_notification.outputs.ts }}' + status: 'cancel' + app_name: '${{ needs.prepare.outputs.version }}' + deploy_to: '${{ vars.DEPLOYMENT_GOOGLE_DISTRIBUTION }}' + version: '${{ needs.prepare.outputs.version }}' + build_number: '${{ needs.prepare.outputs.build_number }}' + changelog: '${{ needs.prepare.outputs.jira-issues-summary }}' + build_description: '${{ inputs.build_description }}' + secrets: + SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' diff --git a/.github/workflows/build-deploy-release.yml b/.github/workflows/build-deploy-release.yml index c39246c928..0ce975585c 100644 --- a/.github/workflows/build-deploy-release.yml +++ b/.github/workflows/build-deploy-release.yml @@ -218,3 +218,24 @@ jobs: build_description: '${{ inputs.build_description }}' secrets: SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' + + cancel_notification: + name: Cancel Notification + if: cancelled() + uses: tangem/actions/.github/workflows/notification.yml@feature/IOS-8741_ci_cd_notifications + needs: + - prepare + - build + - deploy + - build_notification + with: + channel: '${{ vars.SLACK_CHANNEL_DEPLOYMENTS_IOS }}' + message_ts: '${{ needs.build_notification.outputs.ts }}' + status: 'cancel' + app_name: '${{ needs.prepare.outputs.version }}' + deploy_to: '${{ vars.DEPLOYMENT_APPLE_TESTFLIGHT }}' + version: '${{ needs.prepare.outputs.version }}' + build_number: '${{ needs.prepare.outputs.build_number }}' + build_description: '${{ inputs.build_description }}' + secrets: + SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}'