Skip to content

Commit

Permalink
Merge pull request #153 from r00tat/bugfix/gh-action-env-tag
Browse files Browse the repository at this point in the history
Fix env vars for prod in gh action
  • Loading branch information
r00tat authored Sep 28, 2024
2 parents ba7d868 + 80efe32 commit 5af84cb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/cloud-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,20 @@ jobs:
VERSION_TAG=$(echo -n ${VERSION_TAG:0:30} | sed 's@-$@@')
echo "VERSION_TAG=${VERSION_TAG}" >>.version
# if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
# # prod version
# else
# SERVICE="${SERVICE}-dev"
# fi
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
export NEXT_PUBLIC_FIRESTORE_DB=""
SERVICE=$(echo -n "${SERVICE}-dev" | sed 's@/-dev$//')
fi
if [[ "${NEXT_PUBLIC_FIRESTORE_DB}" == "default" ]]; then
# set to empty string
export NEXT_PUBLIC_FIRESTORE_DB=""
fi
echo "NEXT_PUBLIC_FIRESTORE_DB='${NEXT_PUBLIC_FIRESTORE_DB}'" >>$GITHUB_ENV
echo "RUN_SERVICE='${RUN_SERVICE}'" >>$GITHUB_ENV
echo "RUN_REGION='${RUN_REGION}'" >>.version
echo "NEXT_PUBLIC_FIRESTORE_DB='${NEXT_PUBLIC_FIRESTORE_DB}'" >>.version
echo "RUN_SERVICE='${RUN_SERVICE}'" >>.version
echo "RUN_REGION='${RUN_REGION}'" >>.version
Expand Down

0 comments on commit 5af84cb

Please sign in to comment.