Skip to content

Commit

Permalink
github.sh pass ENVIRONMENT_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
yardenasadosa committed Apr 1, 2024
1 parent 5d5c909 commit f391e4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: test
run: |
echo "test"
- name: Run instance refresh rolling update script
- name: Run deployment
run: "$GITHUB_WORKSPACE/github.sh"
shell: bash
env:
ENVIRONMENT_NAME: ${{ inputs.environment }}
4 changes: 2 additions & 2 deletions github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

set -o errexit

echo $GITHUB_ENV
echo $ENVIRONMENT_NAME

case $GITHUB_ENV in
case $ENVIRONMENT_NAME in
*staging*) environment=staging ;;
*production*) environment=production ;;
*) echo "ERROR: Can’t infer environment from job name!"; exit 99 ;;
Expand Down

0 comments on commit f391e4e

Please sign in to comment.