Skip to content

Commit

Permalink
Merge branch 'main' of github.com:gbh-tech/set-environment-action
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercm1410 committed May 15, 2024
2 parents 2411e42 + ed32c70 commit 9465bdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ runs:
echo "Identified default branch : ${DEFAULT_BRANCH}"
echo "Current git reference : ${CURRENT_REF}"
if [[ "$CURRENT_REF" =~ ^v([0-9].[0-9].[0-9])$ ]]; then
if [[ "$CURRENT_REF" =~ ^v([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})$ ]]; then
set_env "ENVIRONMENT=production"
set_output "environment=production"
echo "ENVIRONMENT set to 'production'."
elif [[ "$CURRENT_REF" =~ ^v([0-9].[0-9].[0-9])(-uat.[0-9]{1,2})$ ]]; then
elif [[ "$CURRENT_REF" =~ ^v([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})(-uat.[0-9]{1,2})$ ]]; then
set_env "ENVIRONMENT=uat"
set_output "environment=uat"
echo "ENVIRONMENT set to 'uat'."
Expand Down

0 comments on commit 9465bdb

Please sign in to comment.