Skip to content

Usage of job status check functions in conditionals #26881

Discussion options

You must be logged in to vote
rajivshah3:
   - name: Delete keychain (macOS)
     run: security delete-keychain signing.keychain
     if: matrix.os == 'macos-latest' && ${{ always() }}

This way only always() is treated as an expression, and the rest as a literal string. You need to enclose the whole expression in ${{ ... }}:

   - name: Delete keychain (macOS)
     run: security delete-keychain signing.keychain
     if: ${{ matrix.os == 'macos-latest' && always() }}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants