From f1180e3588abe80dded932c10d3536125e0dcfc5 Mon Sep 17 00:00:00 2001 From: "MD.AL-AMIN" <101187208+alaminAppnap@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:48:38 +0600 Subject: [PATCH] Update deploy.yaml --- .github/workflows/deploy.yaml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 5d82b2c..9a50d90 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,17 +12,34 @@ jobs: steps: - name: Check tag format run: | - tag_name="${{ github.ref }}" + tag_name="${{ github.ref }}" if [[ $tag_name =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Triggering production workflow for tag: $tag_name" - # workflow_dispatch: - # inputs: - # workflow: production.yaml + echo "Running production.yaml for tag: $tag_name" + workflow_dispatch: + inputs: + workflow: production.yaml + # Run your production deployment steps here elif [[ $tag_name =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-RC\.[0-9]+$ ]]; then - echo "Triggering staging workflow for tag: $tag_name" - # workflow_dispatch: - # inputs: - # workflow: staging.yaml + echo "Running staging.yaml for tag: $tag_name" + workflow_dispatch: + inputs: + workflow: staging.yaml + # Run your staging deployment steps here else echo "Tag format not recognized, skipping deployment." exit 78 # Exit with a neutral status code (78) to indicate skipping + fi + # tag_name="${{ github.ref }}" + # if [[ $tag_name =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + # echo "Triggering production workflow for tag: $tag_name" + # # workflow_dispatch: + # # inputs: + # # workflow: production.yaml + # elif [[ $tag_name =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-RC\.[0-9]+$ ]]; then + # echo "Triggering staging workflow for tag: $tag_name" + # # workflow_dispatch: + # # inputs: + # # workflow: staging.yaml + # else + # echo "Tag format not recognized, skipping deployment." + # exit 78 # Exit with a neutral status code (78) to indicate skipping