Skip to content

Commit 1f170fe

Browse files
authored
chore(ci): Fix release-entry canary-release option handling (#6164)
1 parent 37fae70 commit 1f170fe

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ on:
99
- 'docs/**'
1010
workflow_call:
1111
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'
1420
type: boolean
1521
required: false
1622
default: false
1723

1824
jobs:
1925
tests:
20-
if: inputs.canary-release == false
26+
if: inputs.canary-release-skip-checks == false
2127
runs-on: ubuntu-latest
2228
timeout-minutes: 15
2329
strategy:
@@ -53,7 +59,7 @@ jobs:
5359
SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png
5460

5561
checks:
56-
if: inputs.canary-release == false
62+
if: inputs.canary-release-skip-checks == false
5763
runs-on: ubuntu-latest
5864
steps:
5965
- uses: actions/checkout@v5
@@ -98,7 +104,7 @@ jobs:
98104
SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png
99105

100106
e2e-tests:
101-
if: inputs.canary-release == false
107+
if: inputs.canary-release-skip-checks == false
102108
runs-on: ubuntu-latest
103109
steps:
104110
- uses: actions/checkout@v5
@@ -136,7 +142,7 @@ jobs:
136142
PR_URL: ${{github.event.pull_request.html_url}}
137143
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
138144
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
140146
runs-on: ubuntu-latest
141147
outputs:
142148
skip-release: ${{ steps.date-check.outputs.skip-release }}
@@ -166,7 +172,7 @@ jobs:
166172
# execute canary release if:
167173
# either the canary-release was scheduled and the canary-pre-check step resulted in skip-release=false
168174
# 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)
170176
runs-on: ubuntu-latest
171177
needs: [canary-release-pre-check]
172178
permissions:

.github/workflows/release-entry.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ on:
1212
workflow_dispatch:
1313
inputs:
1414
canary-release:
15-
description: 'Release canary version (skips tests and checks)'
16-
type: boolean
15+
description: 'Canary release'
16+
type: choice
1717
required: false
18-
default: false
18+
default: 'With Tests and Checks'
19+
options:
20+
- 'With Tests and Checks'
21+
- 'Skip Tests and Checks (Force Release)'
1922
jobs:
2023
delegate_to_release_job:
2124
if: ${{ github.event_name == 'release' }}
@@ -27,4 +30,5 @@ jobs:
2730
uses: ./.github/workflows/build.yml
2831
secrets: inherit
2932
with:
30-
canary-release: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.canary-release || github.event_name != 'schedule' }}
33+
canary-release-skip-checks: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.canary-release == 'Skip Tests and Checks (Force Release)' }}
34+
is-workflow-call: true

0 commit comments

Comments
 (0)