4
4
push :
5
5
branches :
6
6
- main
7
+ issues :
8
+ types : [opened, labeled]
7
9
8
10
jobs :
9
11
expression-functions :
@@ -19,16 +21,16 @@ jobs:
19
21
if : endsWith('Hello world', 'ld')
20
22
run : echo "The string ends with 'ld'."
21
23
- name : Format and echo string
22
- run : echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
24
+ run : cat ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
23
25
- name : Join issue labels
24
26
if : github.event_name == 'issues'
25
- run : echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
27
+ run : cat "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
26
28
- name : Convert job context to JSON
27
- run : echo "Job context in JSON: ${{ toJSON(github.job) }}"
29
+ run : cat "Job context in JSON: ${{ toJSON(github.job) }}"
28
30
- name : Parse JSON string
29
- run : echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
31
+ run : cat "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
30
32
- name : Hash files
31
- run : echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
33
+ run : cat "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
32
34
- name : The job has succeeded
33
35
if : ${{ success() }}
34
36
- name : The job has failed
0 commit comments