|
| 1 | +name: Event |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + if-tests: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + permissions: {} |
| 10 | + steps: |
| 11 | + - name: Test 1 |
| 12 | + if: github.actor == "foo" |
| 13 | + run: echo "Test 1 should not be printed" |
| 14 | + - name: Test 2 |
| 15 | + if: | |
| 16 | + ${{ |
| 17 | + github.actor == "foo" || |
| 18 | + 3 == 4 |
| 19 | + }} |
| 20 | + run: echo "Test 2 should not be printed" |
| 21 | + - name: Test 3 |
| 22 | + if: ${{ github.actor == "foo" }} |
| 23 | + run: echo "Test 3 should not be printed" |
| 24 | + - name: Test 4 |
| 25 | + if: ${{ github.actor == "foo" }} |
| 26 | + run: echo "Test 4 should not be printed" |
| 27 | + - name: Test 5 |
| 28 | + if: ${{ |
| 29 | + github.actor == "foo" || |
| 30 | + 3 == 4 |
| 31 | + }} |
| 32 | + run: echo "Test 5 should not be printed" |
| 33 | + - name: Test 6 |
| 34 | + if: ${{ 1 == 1 }} ${{ github.actor == "foo" }} |
| 35 | + run: echo "Test 6 should not be printed" |
| 36 | + - name: Test 7 |
| 37 | + run: echo "Test 7 should not be printed" |
| 38 | + if: ${{ |
| 39 | + github.actor == "foo" || |
| 40 | + 3 == 4 |
| 41 | + }} |
| 42 | + |
| 43 | + - name: Test 8 |
| 44 | + run: echo "Test 8 should not be printed" |
| 45 | + if: > |
| 46 | + ${{ |
| 47 | + github.actor == "foo" || |
| 48 | + 3 == 4 }} |
| 49 | + - name: Test 9 |
| 50 | + if: '${{ github.actor == "foo" }}' |
| 51 | + run: echo "Test 9 should not be printed" |
| 52 | + - name: Test 10 |
| 53 | + if: "${{ github.actor == 111 }}" |
| 54 | + run: echo "Test 10 should not be printed" |
| 55 | + - name: Test 11 |
| 56 | + if: " ${{ github.actor == 111 }}" |
| 57 | + run: echo "Test 11 should not be printed" |
| 58 | + - name: Test 12 |
| 59 | + if: " ${{ github.actor == 111 }}" |
| 60 | + run: echo "Test 12 should not be printed" |
| 61 | + - name: Test 13 |
| 62 | + if: | |
| 63 | + github.actor == "foo" || |
| 64 | + 3 == 4 |
| 65 | + run: echo "Test 13 should not be printed" |
| 66 | + - name: Test 14 |
| 67 | + if: >- |
| 68 | + ${{( |
| 69 | + false || github.actor == "foo" |
| 70 | + )}} |
| 71 | + run: echo "Test 14 should not be printed" |
| 72 | + - name: Test 15 |
| 73 | + if: |- |
| 74 | + ${{( |
| 75 | + false || github.actor == "foo" |
| 76 | + )}} |
| 77 | + run: echo "Test 15 should not be printed" |
| 78 | + - name: Test 16 |
| 79 | + if: |+ |
| 80 | + ${{( |
| 81 | + false || github.actor == "foo" |
| 82 | + )}} |
| 83 | + run: echo "Test 16 should not be printed" |
| 84 | + - name: Test 17 |
| 85 | + if: >+ |
| 86 | + ${{( |
| 87 | + false || github.actor == "foo" |
| 88 | + )}} |
| 89 | + run: echo "Test 17 should not be printed" |
| 90 | + - name: Test 18 |
| 91 | + if: ${{ github.actor }} == 'foo' |
| 92 | + run: echo "Test 18 should not be printed" |
| 93 | + - name: Test 19 |
| 94 | + if: ${{ contains(fromJSON('["OWNER", "MEMBER"]'), github.event.pull_request.author_association )}} || github.actor == 'renovate[bot]' |
| 95 | + run: echo "Test 19 should not be printed" |
| 96 | + - name: Test 20 |
| 97 | + if: ${{ github.actor }} != "" |
| 98 | + run: echo "Test 20 should not be printed" |
| 99 | + - name: Test 21 |
| 100 | + if: > |
| 101 | + ${{ github.actor == 'foo' && |
| 102 | + github.event.workflow_run.conclusion == 'success' }} |
| 103 | + run: echo "Test 21 should not be printed" |
| 104 | + - name: Test 22 |
| 105 | + if: | |
| 106 | + runner.os == 'Windows' && ( |
| 107 | + startsWith(inputs.node, 'v10.') || |
| 108 | + startsWith(inputs.node, 'v12.') || |
| 109 | + startsWith(inputs.node, 'v14.') |
| 110 | + ) |
| 111 | + run: echo "Test 22 should not be printed" |
0 commit comments