From 2a521f5615f233c93bb5a553a79d5a09ed597937 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:59:48 -0700 Subject: [PATCH] Stable Release (#2607) * Beta Release (#2604) * fix: split cd by environment * improve slack alerts for cd * testing new branching strategy CD (#2598) * WIP: branching strategy * bump node version * revert: node version bump * WIP: CD create beta release pr * fix: CD create beta release pr * fix: show future cd workflow names * dep: bump github action versions * turn on stable release pr creation * add: Darwins existing PR check * add: use zesty branding for automated slack notifications * improve slack notice message --------- Co-authored-by: shrunyan * Beta Release (#2606) * fix: split cd by environment * improve slack alerts for cd * testing new branching strategy CD (#2598) * WIP: branching strategy * bump node version * revert: node version bump * WIP: CD create beta release pr * fix: CD create beta release pr * fix: show future cd workflow names * dep: bump github action versions * turn on stable release pr creation * add: Darwins existing PR check * add: use zesty branding for automated slack notifications * improve slack notice message --------- Co-authored-by: shrunyan --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: shrunyan --- .github/workflows/cd-dev-stage.yaml | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cd-dev-stage.yaml b/.github/workflows/cd-dev-stage.yaml index ce49589f21..095d94cffb 100644 --- a/.github/workflows/cd-dev-stage.yaml +++ b/.github/workflows/cd-dev-stage.yaml @@ -95,10 +95,10 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_CHANNEL: code-deploy - SLACK_COLOR: "#FF0000" - SLACK_ICON: https://clipart.world/wp-content/uploads/2021/06/Rocket-Ship-clipart-png.png + SLACK_COLOR: "#FF2A08" + SLACK_ICON: https://brand.zesty.io/zesty-io-logo.svg SLACK_MESSAGE: "PR merge by ${{ github.actor }} failed to deploy." - SLACK_TITLE: FAILED Dev/Stage Deployment for manager-ui + SLACK_TITLE: "FAILED: Dev/Stage Deployment for manager-ui" SLACK_USERNAME: Deploy Bot SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} @@ -111,10 +111,10 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_CHANNEL: code-deploy - SLACK_COLOR: "#36a64f" - SLACK_ICON: https://clipart.world/wp-content/uploads/2021/06/Rocket-Ship-clipart-png.png - SLACK_MESSAGE: "PR merge by ${{ github.actor }} has been deployed to stage." - SLACK_TITLE: Stage Deployment for manager-ui + SLACK_COLOR: "#75BF43" + SLACK_ICON: https://brand.zesty.io/zesty-io-logo.svg + # SLACK_MESSAGE: "PR merge by ${{ github.actor }} has been deployed to stage." + SLACK_TITLE: "SUCCESS: Stage Deployment of manager-ui" SLACK_USERNAME: Deploy Bot SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} @@ -124,7 +124,24 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v2 - - name: Create Beta Release PR + + - name: Check if PR exists + id: check + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + prs=$(gh pr list \ + --repo "$GITHUB_REPOSITORY" \ + --head 'dev' \ + --base 'beta' \ + --json title \ + --jq 'length') + if ((prs > 0)); then + echo "skip=true" >> "$GITHUB_OUTPUT" + fi + + - name: Create Beta Release + if: "!steps.check.outputs.skip" run: gh pr create -B beta -H dev --title 'Beta Release' --body 'Created by Github action' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}