Skip to content

16 - Working with Environments #4

16 - Working with Environments

16 - Working with Environments #4

name: 16 - Working with Environments
on:
workflow_dispatch:
jobs:
deploy-staging:
runs-on: ubuntu-latest
environment: staging
env:
my-env-value: ${{ vars.MY_ENV_VALUE || 'default value' }}
steps:
- name: Echo vars
run: |
echo "Deploying to staging"
e2e-tests:
runs-on: ubuntu-latest
needs: deploy-staging
steps:
- name: E2E tests
run: echo "Running E2e"
deploy-prod:
runs-on: ubuntu-latest
needs: e2e-tests
environment: prod
env:
my-env-value: ${{ vars.MY_ENV_VALUE || 'default value' }}
steps:
- name: Echo vars
run: |
echo "Deploying to prod"