-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (25 loc) · 1.05 KB
/
Copy pathp10_expressionsAndContext.yaml
File metadata and controls
29 lines (25 loc) · 1.05 KB
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
name: Expressions and Context
run-name: "Printing Expressions and Context by user: @${{ github.actor }}, event: ${{ github.event_name }}"
on:
workflow_dispatch:
jobs:
printing-values:
runs-on: ubuntu-latest
steps:
- name: Displaying some Expressions
run: |
echo "1 evaluates to: ${{ 1 }}"
echo "'this is a String' evaluates to: ${{ 'this is a String' }}"
echo "null evaluates to: ${{ null }}"
echo "true evaluates to: ${{ true }}"
echo "Is 1 > 2? => ${{ 1 > 2 }}"
echo "Is 'string' == 'String'? => ${{ 'string' == 'String' }}"
echo "true && false evaluates to: ${{ true && false }}"
echo "true || false evaluates to: ${{ true || false }}"
- name: Displaying some Contexts
run: |
echo "GitHub Context: ${{ toJson(github) }}"
echo "Job Context: ${{ toJson(job) }}"
echo "Secrets Context: ${{ toJson(secrets) }}"
echo "Steps Context: ${{ toJson(steps) }}"
echo "Runner Context: ${{ toJson(runner) }}"