Skip to content

Commit

Permalink
send Slack notification on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vdb committed Oct 6, 2023
1 parent 02eeb88 commit 800089e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/automatic-release-to-main-merger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ jobs:
with:
branch: ${{ steps.get-branch-name.outputs.new_branch }}

- name: Notify Slack if creating a new branch failed 馃挰
if: ${{ failure() && steps.create-new-branch.conclusion == 'failure' }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_INFRASTRUCTURE_SQUAD_MONITORS_WEBHOOK_URL }}
uses: Ilshidur/action-slack@689ad44a9c9092315abd286d0e3a9a74d31ab78a
with:
args: "馃毃 There was a problem with creating a new branch containing commits from the ${{ env.RELEASE_BRANCH }} release branch. Check out the Github action: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

- name: Open pull request 鈽勶笍
if: ${{ steps.create-new-branch.conclusion == 'success' }}
uses: repo-sync/pull-request@7e79a9f5dc3ad0ce53138f01df2fad14a04831c5
Expand Down Expand Up @@ -111,11 +103,11 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Notify Slack when closing of outdated merge-PRs failed 馃挰
if: ${{ failure() && steps.close-outdated-release-merge-prs.conclusion == 'failure'}}
- name: Notify Slack on failure 馃挰
if: failure()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_INFRASTRUCTURE_SQUAD_MONITORS_WEBHOOK_URL }}
uses: Ilshidur/action-slack@689ad44a9c9092315abd286d0e3a9a74d31ab78a
with:
args: "馃毃 There was a problem with closing outdated release-merge-PRs of the ${{ env.RELEASE_BRANCH }} release branch. Check out the Github action: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \
These release-merge-PRs are currently open: https://github.com/${{ github.repository }}/pulls?q=is%3Aopen+label%3A${{ env.LABEL_TYPE }}+head%3Amerge-${{ steps.get-branch-name.outputs.release_branch }}-main"
args: "馃毃 There was a problem with porting changes from ${{ env.RELEASE_BRANCH }} to the `main` branch. \
Check out the Github action: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

0 comments on commit 800089e

Please sign in to comment.