Skip to content

Commit c28313b

Browse files
authored
try fix
1 parent 57e9a42 commit c28313b

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/expression-functions.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
issues:
8-
types: [opened, labeled]
97

108
jobs:
119
expression-functions:
@@ -14,24 +12,35 @@ jobs:
1412
- name: Check if string contains substring
1513
if: contains('Hello world', 'llo')
1614
run: echo "The string contains the substring."
15+
1716
- name: Check if string starts with
1817
if: startsWith('Hello world', 'He')
1918
run: echo "The string starts with 'He'."
19+
2020
- name: Check if string ends with
2121
if: endsWith('Hello world', 'ld')
2222
run: echo "The string ends with 'ld'."
23+
2324
- name: Format and echo string
24-
run: cat ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
25+
run: echo "${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}"
26+
2527
- name: Join issue labels
2628
if: github.event_name == 'issues'
27-
run: cat "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
29+
run: echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
30+
2831
- name: Convert job context to JSON
29-
run: cat "Job context in JSON: ${{ toJSON(github.job) }}"
32+
run: echo "Job context in JSON: ${{ toJSON(github.job) }}"
33+
3034
- name: Parse JSON string
31-
run: cat "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
35+
run: echo "Parsed JSON: ${{ fromJSON('{\"hello\":\"world\"}').hello }}"
36+
3237
- name: Hash files
33-
run: cat "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
38+
run: echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}"
39+
3440
- name: The job has succeeded
3541
if: ${{ success() }}
42+
run: echo "The job succeeded!"
43+
3644
- name: The job has failed
37-
if: ${{ failure() }}
45+
if: ${{ failure() }}
46+
run: echo "The job failed!"

0 commit comments

Comments
 (0)