Skip to content

Commit

Permalink
[CI/CD] stop using set-output in cap deploy (#1348)
Browse files Browse the repository at this point in the history
Addresses: #1312

Co-authored-by: Prashant <[email protected]>
  • Loading branch information
donrestarone and alis-khadka authored Jan 12, 2023
1 parent 4604930 commit 35ac018
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
outputs:
github_envs: ${{ steps.branch_check.outputs.github_envs }}
deploy_env: ${{ steps.branch_check.outputs.deploy_env }}
steps:
- name: Choose Environment
id: branch_check
Expand All @@ -15,15 +18,12 @@ jobs:
ENV_ARRAY="${{secrets.CLIENT_ENVS}}"
ENV_ARRAY="${ENV_ARRAY//, /,}"
ENV_ARRAY="${ENV_ARRAY//,/\",\"}"
echo "::set-output name=github_envs::{\"value\":[\"${ENV_ARRAY}\"]}"
echo "::set-output name=deploy_env::production"
echo "github_envs={\"value\":[\"${ENV_ARRAY}\"]}" >> $GITHUB_OUTPUT
echo "deploy_env=production" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/rc" ]; then
echo "::set-output name=github_envs::{\"value\":['staging']}"
echo "::set-output name=deploy_env::staging"
echo "github_envs={\"value\":['staging']}" >> $GITHUB_OUTPUT
echo "deploy_env=staging" >> $GITHUB_OUTPUT
fi
outputs:
github_envs: ${{ steps.branch_check.outputs.github_envs }}
deploy_env: ${{ steps.branch_check.outputs.deploy_env }}
deploy:
needs: build
Expand Down

0 comments on commit 35ac018

Please sign in to comment.