|
9 | 9 | - 'docs/**' |
10 | 10 | workflow_call: |
11 | 11 | inputs: |
12 | | - canary-release: |
13 | | - description: 'Release canary version (skips tests and checks)' |
| 12 | + canary-release-skip-checks: |
| 13 | + description: 'Release canary version (true skips tests and checks)' |
| 14 | + type: boolean |
| 15 | + required: false |
| 16 | + default: false |
| 17 | + # This allows cleanly separating this workflow_call from other event triggers |
| 18 | + is-workflow-call: |
| 19 | + description: 'Indicates that the workflow was triggered via workflow_call' |
14 | 20 | type: boolean |
15 | 21 | required: false |
16 | 22 | default: false |
17 | 23 |
|
18 | 24 | jobs: |
19 | 25 | tests: |
20 | | - if: inputs.canary-release == false |
| 26 | + if: inputs.canary-release-skip-checks == false |
21 | 27 | runs-on: ubuntu-latest |
22 | 28 | timeout-minutes: 15 |
23 | 29 | strategy: |
|
53 | 59 | SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png |
54 | 60 |
|
55 | 61 | checks: |
56 | | - if: inputs.canary-release == false |
| 62 | + if: inputs.canary-release-skip-checks == false |
57 | 63 | runs-on: ubuntu-latest |
58 | 64 | steps: |
59 | 65 | - uses: actions/checkout@v5 |
|
98 | 104 | SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png |
99 | 105 |
|
100 | 106 | e2e-tests: |
101 | | - if: inputs.canary-release == false |
| 107 | + if: inputs.canary-release-skip-checks == false |
102 | 108 | runs-on: ubuntu-latest |
103 | 109 | steps: |
104 | 110 | - uses: actions/checkout@v5 |
@@ -136,7 +142,7 @@ jobs: |
136 | 142 | PR_URL: ${{github.event.pull_request.html_url}} |
137 | 143 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
138 | 144 | canary-release-pre-check: |
139 | | - if: github.event_name == 'workflow_call' && inputs.canary-release == false |
| 145 | + if: inputs.is-workflow-call && inputs.canary-release-skip-checks == false |
140 | 146 | runs-on: ubuntu-latest |
141 | 147 | outputs: |
142 | 148 | skip-release: ${{ steps.date-check.outputs.skip-release }} |
@@ -166,7 +172,7 @@ jobs: |
166 | 172 | # execute canary release if: |
167 | 173 | # either the canary-release was scheduled and the canary-pre-check step resulted in skip-release=false |
168 | 174 | # or the canary-release input is true |
169 | | - if: always() && (needs.canary-release-pre-check.outputs.skip-release == 'false' || inputs.canary-release == true) |
| 175 | + if: always() && inputs.is-workflow-call && (needs.canary-release-pre-check.outputs.skip-release == 'false' || inputs.canary-release-skip-checks == true) |
170 | 176 | runs-on: ubuntu-latest |
171 | 177 | needs: [canary-release-pre-check] |
172 | 178 | permissions: |
|
0 commit comments