Skip to content

set env to enivronment vairalbe #24

set env to enivronment vairalbe

set env to enivronment vairalbe #24

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
workflow_dispatch:
env:
deployment-value: ${{ 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 $deployment-value"
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 $deployment-value"
name: deploy
# ...deployment-specific steps
deploy-prod:
runs-on: ubuntu-latest
environment: prod
needs: deploy-test
steps:
- run: |
echo ${{ secrets.ENVIRONMENTSECRET }}
echo "Deployment is $deployment-value"
name: deploy
# ...deployment-specific steps