Thursday, November 4, 2021

expressions,contexts,failure step

 expressions:

objects,function calls,arithmetic operations,etc

${{ }}


${{toJson(runner)}} #job,github


contexts available: runner,job,github,steps,etc


echo ${{contains('hello','ll')}}

echo ${{format('Hello {0} {1}','World','!')}}

similarly startsWith,endsWith,etc


log-env:

    runs-on: ubuntu-latest

    if: github.event_name == 'push'

    steps:


if can also be used in individual steps.


-name: spomefd

 if: failure() #always()

 run: echo "$STEPS_CONTEXT"


No comments:

Post a Comment