Skip to content

Commit

Permalink
env-variable to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
nnamtug committed May 23, 2024
1 parent 145cc94 commit 0e6ec70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/autopublisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ jobs:
- name: Git to Staging Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_git2staging.sh
env:
PUBLISHER_ENVIRONMENT: ${{ vars.PUBLISHER_ENVIRONMENT }}
- name: Staging to Prod Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_staging2prod.sh
env:
PUBLISHER_ENVIRONMENT: ${{ vars.PUBLISHER_ENVIRONMENT }}
- name: Cleanup Staging Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_stagingcleanup.sh
env:
PUBLISHER_ENVIRONMENT: ${{ vars.PUBLISHER_ENVIRONMENT }}

4 changes: 2 additions & 2 deletions publisher/functions.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
set
if [ -z "${ENV:PUBLISHER_ENVIRONMENT}" ]
if [ -z "${PUBLISHER_ENVIRONMENT}" ]
then
configfile="${SCRIPT_DIR}/config-${ENV:PUBLISHER_ENVIRONMENT}.sh"
configfile="${SCRIPT_DIR}/config-${PUBLISHER_ENVIRONMENT}.sh"
else
configfile=$SCRIPT_DIR/config.sh
fi
Expand Down

0 comments on commit 0e6ec70

Please sign in to comment.