Merge pull request #10 from IntelliTect-Samples/9-test-environment #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
deploymentvalue: ${{ vars.DEPLOYMENT }} | |
jobs: | |
deploy-dev: | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
./display-value.ps1 ${{ secrets.ENVIRONMENTSECRET }} | |
echo "deployment value is $env:deploymentvalue" | |
dir env: | |
name: deploy | |
shell: pwsh | |
working-directory: tools | |
# ...deployment-specific steps | |
deploy-test: | |
runs-on: ubuntu-latest | |
environment: test | |
needs: deploy-dev | |
steps: | |
- run: | | |
echo ${{ secrets.ENVIRONMENTSECRET }} | |
echo "Deployment is $deploymentvalue" | |
name: deploy | |
# ...deployment-specific steps | |
deploy-prod: | |
runs-on: ubuntu-latest | |
environment: prod | |
needs: deploy-test | |
steps: | |
- run: | | |
echo ${{ secrets.ENVIRONMENTSECRET }} | |
echo "Deployment is $deploymentvalue" | |
name: deploy | |
# ...deployment-specific steps |