Skip to content

Commit 8e6c8f1

Browse files
expression function
1 parent e97da72 commit 8e6c8f1

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/expression-functions.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,20 @@ jobs:
2424
run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
2525
- name: Join issue labels
2626
if: github.event_name == 'issues'
27-
run: echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}"
27+
run: |
28+
echo \"Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}\""
2829
- name: Convert job context to JSON
29-
run: echo "Job context in JSON: ${{ toJSON(github.job) }}"
30+
run: |
31+
echo 'Job context in JSON: ${{ toJSON(github.job) }}'
3032
- name: Parse JSON string
31-
run: echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
33+
run: |
34+
echo "Parsed JSON: ${{ fromJSON('{\"hello\":\"world\"}').hello }}"
3235
- name: Hash files
33-
run: echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
36+
run: |
37+
echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
3438
- name: The job has succeeded
3539
if: ${{ success() }}
40+
run: echo "The job has succeeded."
3641
- name: The job has failed
37-
if: ${{ failure() }}
42+
if: ${{ failure() }}
43+
run: echo "The job has failed."

0 commit comments

Comments
 (0)