Skip to content

Commit

Permalink
expression function
Browse files Browse the repository at this point in the history
  • Loading branch information
omenking authored Apr 30, 2024
1 parent 5ea95e5 commit eefadb6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/expression-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ jobs:
- name: Format and echo string
run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }}
- name: Convert job context to JSON
run: echo "Job context in JSON: ${{ toJSON(github.job) }}"
run: "echo \"Job context in JSON: ${{ toJSON(github.job) }}\""
- name: Parse JSON string
run: echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}"
run: "echo \"Parsed JSON: ${{ fromJSON('{\"hello\":\"world\"}').hello }}\""
- name: Hash files
run: echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}
run: "echo \"Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}\""
- name: The job has succeeded
if: ${{ success() }}
run: echo "SUCCESS!"
- name: The job has failed
if: ${{ failure() }}
if: ${{ failure() }}
run: echo "Failure!"

0 comments on commit eefadb6

Please sign in to comment.