Skip to content

Commit

Permalink
feat(16-environments): split into multiple jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
lauromueller committed Nov 18, 2023
1 parent b340a70 commit 9f0f979
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/16-environments.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
name: 16 - Working with Environments
run-name: 16 - Working with Environments | env - ${{ inputs.target-env }}

on:
workflow_dispatch:
inputs:
target-env:
type: environment
default: staging

jobs:
echo:
deploy-staging:
runs-on: ubuntu-latest
environment: ${{ inputs.target-env }}
environment: staging
env:
my-env-value: ${{ vars.MY_ENV_VALUE || 'default value' }}
steps:
- name: Echo vars
run: |
echo "Env variable: ${{ env.my-env-value }}"
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"

0 comments on commit 9f0f979

Please sign in to comment.