Skip to content

Commit

Permalink
Update demo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
housten authored Jun 14, 2024
1 parent cdaf448 commit 90043d3
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,49 @@ name: demoFlow
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
type: environment
required: true

name:
description: 'Person name'
default: 'Team'

jobs:
echo:
strategy:
matrix:
environment: [dev,test,qa]
build:
runs-on: ubuntu-latest
environment: ${{ matrix.environment }}
steps:
- run: "Bulding"
test:
runs-on: ubuntu-latest
needs: build
environment: dev
steps:
- name: Echo
run: echo "Hello, ${{ matrix.environment}} ${{ vars.SERVICE_ACCOUNT }}"; echo " ${{ matrix.environment }} ${{ vars.SERVICE_ACCOUNT }} ">> $GITHUB_STEP_SUMMARY

load-test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
needs: build
environment: test
steps:
- name: sleepy
run: |
echo "testing 1,2,3"
sleep 5
production:
runs-on: ubuntu-latest
if: github.event.inputs.environment == 'qa'
needs: [test,load-test]
environment:
name: qa
url: https://writeabout.net
steps:
- run: echo " step 1 " ; sleep 5
- run: echo " step 2 " ; sleep 5
- run: echo " step 3 " ; sleep 5
- run: echo " step 4 " ; sleep 5
- run: echo " step 5 " ; sleep 5

0 comments on commit 90043d3

Please sign in to comment.