Skip to content

Commit

Permalink
go to hardcoded env
Browse files Browse the repository at this point in the history
  • Loading branch information
nnamtug committed May 23, 2024
1 parent 2d20388 commit 9f94393
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/autopublisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ jobs:
- uses: actions/checkout@v4
- name: Git to Staging Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_git2staging.sh "$PUBLISHER_ENVIRONMENT"
$GITHUB_WORKSPACE/publisher/auto_git2staging.sh
env:
PUBLISHER_ENVIRONMENT: "${{ env.PUBLISHER_ENVIRONMENT }}"
# not working due to self hosted runner on docker
# PUBLISHER_ENVIRONMENT: "${{ env.PUBLISHER_ENVIRONMENT }}"
PUBLISHER_ENVIRONMENT: example
- name: Staging to Prod Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_staging2prod.sh
env:
PUBLISHER_ENVIRONMENT: $PUBLISHER_ENVIRONMENT
PUBLISHER_ENVIRONMENT: example
- name: Cleanup Staging Repo
run: |
$GITHUB_WORKSPACE/publisher/auto_stagingcleanup.sh
env:
PUBLISHER_ENVIRONMENT: "${{ env.PUBLISHER_ENVIRONMENT }}"
PUBLISHER_ENVIRONMENT: example

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 "$1" ]
if [ -z "${PUBLISHER_ENVIRONMENT}" ]
then
configfile="${SCRIPT_DIR}/config-${1}.sh"
configfile="${SCRIPT_DIR}/config-${PUBLISHER_ENVIRONMENT}.sh"
else
configfile=$SCRIPT_DIR/config.sh
fi
Expand Down

0 comments on commit 9f94393

Please sign in to comment.