Skip to content

Commit

Permalink
Revert "Corrected env variable import in nginx config"
Browse files Browse the repository at this point in the history
This reverts commit a74d4d7.
  • Loading branch information
mauritzs committed Mar 11, 2025
1 parent aca5016 commit d9e87f9
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/update_primary_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up environment variables
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true

- name: Check environment variables
run: env

# This is bad practise as environment variables should be stored in a secure location, but hey it works now.
# Can be fixed through utilizing predefined custom workflow, or github runners-secrets
# - name: Export environment variables
# run: |
# export GROUP_ID="05"
# export PORT_PREFIX="2"
# export DEV_POSTFIX="1"
# export STAG_POSTFIX="2"
# export PROD_POSTFIX="3"
# export GATEWAY_POSTFIX="6"

# export DEV_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${DEV_POSTFIX}"
# export STAG_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${STAG_POSTFIX}"
# export PROD_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${PROD_POSTFIX}"

# echo "DEV_PORT_PREFIX=$DEV_PORT_PREFIX" >> $GITHUB_ENV
# echo "STAG_PORT_PREFIX=$STAG_PORT_PREFIX" >> $GITHUB_ENV
# echo "PROD_PORT_PREFIX=$PROD_PORT_PREFIX" >> $GITHUB_ENV
# echo "GATEWAY_POSTFIX=$GATEWAY_POSTFIX" >> $GITHUB_ENV
- name: Export environment variables
run: |
export GROUP_ID="05"
export PORT_PREFIX="2"
export DEV_POSTFIX="1"
export STAG_POSTFIX="2"
export PROD_POSTFIX="3"
export GATEWAY_POSTFIX="6"
export DEV_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${DEV_POSTFIX}"
export STAG_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${STAG_POSTFIX}"
export PROD_PORT_PREFIX="${PORT_PREFIX}${GROUP_ID}${PROD_POSTFIX}"
echo "DEV_PORT_PREFIX=$DEV_PORT_PREFIX" >> $GITHUB_ENV
echo "STAG_PORT_PREFIX=$STAG_PORT_PREFIX" >> $GITHUB_ENV
echo "PROD_PORT_PREFIX=$PROD_PORT_PREFIX" >> $GITHUB_ENV
echo "GATEWAY_POSTFIX=$GATEWAY_POSTFIX" >> $GITHUB_ENV
- name: Replace environment variables in Nginx config
run: |
Expand Down

0 comments on commit d9e87f9

Please sign in to comment.