Skip to content

16 - Working with Environments #6

16 - Working with Environments

16 - Working with Environments #6

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-frontend:
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 prod frontend"
deploy-prod-backend1:
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 prod backend 1"
deploy-prod-backend2:
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 prod backend 2"