From 4053a1908c75fba5a2f2083f81a436af37562e5a Mon Sep 17 00:00:00 2001 From: Alex Urbina <42731074+urbinaalex17@users.noreply.github.com> Date: Mon, 27 May 2024 15:33:18 -0600 Subject: [PATCH] BRE-87 ADD: Slack notification enable feature and check in version-bump workflow (#145) --- .github/workflows/version-bump.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 7e4d8ce..c0beb82 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -12,6 +12,10 @@ on: description: "Cut RC branch?" default: true type: boolean + enable_slack_notification: + description: "Enable Slack notifications for upcoming release?" + default: false + type: boolean jobs: bump_version: @@ -26,6 +30,14 @@ jobs: with: version: ${{ inputs.version_number_override }} + - name: Slack Notification Check + run: | + if [[ "${{ inputs.enable_slack_notification }}" == true ]]; then + echo "Slack notifications enabled." + else + echo "Slack notifications disabled." + fi + - name: Checkout Branch uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: @@ -199,7 +211,7 @@ jobs: run: gh pr merge $PR_NUMBER --squash --auto --delete-branch - name: Report upcoming release version to Slack - if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }} + if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' && inputs.enable_slack_notification == true }} uses: bitwarden/gh-actions/report-upcoming-release-version@main with: version: ${{ steps.set-final-version-output.outputs.version }}