Skip to content

Commit

Permalink
Update deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alaminAppnap authored Jan 16, 2024
1 parent c67b4d2 commit f1180e3
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1180e3

Please sign in to comment.