Skip to content

Commit

Permalink
add 'crn-create-algolia-environment' label to create dedicated algoli…
Browse files Browse the repository at this point in the history
…a env
  • Loading branch information
dianaguimaraes committed Sep 20, 2024
1 parent 53fc96a commit f48db14
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ runs:
echo "crn-auth0-domain=pr-asap-hub.us.auth0.com" >> $GITHUB_OUTPUT
fi
CRN_CREATE_ALGOLIA_PR_ENV=${{ contains(github.event.pull_request.labels.*.name, 'crn-create-algolia-environment') || inputs.crn-create-env }}
CRN_CREATE_CONTENTFUL_PR_ENV=${{ contains(github.event.pull_request.labels.*.name, 'crn-create-environment') || inputs.crn-create-env }}
GP2_CREATE_CONTENTFUL_PR_ENV=${{ contains(github.event.pull_request.labels.*.name, 'gp2-create-environment') || inputs.gp2-create-env }}
Expand All @@ -312,15 +313,25 @@ runs:
echo "gp2-api-url=https://api-$PR_NUMBER.gp2.asap.science" >> $GITHUB_OUTPUT
if [ "$CRN_CREATE_CONTENTFUL_PR_ENV" = true ]; then
echo "setting up dedicated PR env"
echo "setting up dedicated Contentful PR env"
# echo "crn-algolia-index=asap-hub_CI-$PR_NUMBER" >> $GITHUB_OUTPUT
# echo "crn-analytics-algolia-index=crn-analytics_CI-$PR_NUMBER" >> $GITHUB_OUTPUT
echo "crn-contentful-env-id=crn-$PR_NUMBER" >> $GITHUB_OUTPUT
else
echo "setting up PR with Contentful pointing to DEV env"
# echo "crn-algolia-index=asap-hub_dev" >> $GITHUB_OUTPUT
# echo "crn-analytics-algolia-index=crn-analytics_dev" >> $GITHUB_OUTPUT
echo "crn-contentful-env-id=Development" >> $GITHUB_OUTPUT
fi
if [ "$CRN_CREATE_ALGOLIA_PR_ENV" = true ]; then
echo "setting up dedicated Algolia PR env"
echo "crn-algolia-index=asap-hub_CI-$PR_NUMBER" >> $GITHUB_OUTPUT
echo "crn-analytics-algolia-index=crn-analytics_CI-$PR_NUMBER" >> $GITHUB_OUTPUT
echo "crn-contentful-env-id=crn-$PR_NUMBER" >> $GITHUB_OUTPUT
else
echo "setting up PR pointing to DEV env"
echo "setting up PR with Algolia pointing to DEV env"
echo "crn-algolia-index=asap-hub_dev" >> $GITHUB_OUTPUT
echo "crn-analytics-algolia-index=crn-analytics_dev" >> $GITHUB_OUTPUT
echo "crn-contentful-env-id=Development" >> $GITHUB_OUTPUT
fi
if [ "$GP2_CREATE_CONTENTFUL_PR_ENV" = true ]; then
Expand Down

0 comments on commit f48db14

Please sign in to comment.