@@ -14,24 +14,35 @@ jobs:
1414 - name : Check if string contains substring
1515 if : contains('Hello world', 'llo')
1616 run : echo "The string contains the substring."
17+
1718 - name : Check if string starts with
1819 if : startsWith('Hello world', 'He')
1920 run : echo "The string starts with 'He'."
21+
2022 - name : Check if string ends with
2123 if : endsWith('Hello world', 'ld')
2224 run : echo "The string ends with 'ld'."
25+
2326 - name : Format and echo string
24- run : echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
27+ run : echo "${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}"
28+
2529 - name : Join issue labels
2630 if : github.event_name == 'issues'
2731 run : echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
32+
2833 - name : Convert job context to JSON
2934 run : echo "Job context in JSON: ${{ toJSON(github.job) }}"
35+
3036 - name : Parse JSON string
3137 run : echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
38+
3239 - name : Hash files
33- run : echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
40+ run : echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}"
41+
3442 - name : The job has succeeded
35- if : ${{ success() }}
43+ if : success()
44+ run : echo "Job succeeded"
45+
3646 - name : The job has failed
37- if : ${{ failure() }}
47+ if : failure()
48+ run : echo "Job failed"
0 commit comments