generated from ps-actions-sandbox/ActionsFundamentals
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.2 KB
/
demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: demoFlow
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
type: environment
required: true
name:
description: 'Person name'
default: 'Team'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "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