-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 940 Bytes
/
context.yml
File metadata and controls
31 lines (29 loc) · 940 Bytes
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
name: contexts
on: [pull_request]
jobs:
functions:
runs-on: ubuntu-latest
steps:
- name: dump
run: |
echo ${{contains('hello','li')}}
echo ${{startsWith('hello','he')}}
echo ${{format('Hello {0} {1} {2}','World','!','!')}}
eccho "this step is intentionally to fail in order to test functions"
- name: test failure functions
if: failure()
run: echo "previous step failed but we able to execute this step by adding failure() function"
- name: run after previous filure
if: always()
run: echo "previous step filed but this step was run"
one:
runs-on: ubuntu-latest
steps:
- name : Dump github contexts
env:
GITHUB_CONTEXT: ${{toJson(github)}}
run: echo "$GITHUB_CONTEXT"
- name: dump steps contexts
env:
STEPS_CONTEXT: ${{toJson(steps)}}
run: echo "$STEPS_CONTEXT"