Skip to content

Commit

Permalink
[ci] Using olmChannel input instead of prerelease
Browse files Browse the repository at this point in the history
* In order to set the desired channel and default channel
* Changed consolePlugin default to `0.0.0`
* Also descriptions of inputs to semver

Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Mar 4, 2025
1 parent f9b701f commit c391acd
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/automated-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,34 @@ on:
default: "main"
type: string
kuadrantOperatorVersion:
description: Kuadrant Operator version (X.Y.Z-<pre-release id>)
description: Kuadrant Operator version (semver)
default: 0.0.0
type: string
authorinoOperatorVersion:
description: Authorino Operator bundle version (X.Y.Z)
description: Authorino Operator bundle version (semver)
default: 0.0.0
type: string
limitadorOperatorVersion:
description: Limitador Operator bundle version (X.Y.Z)
description: Limitador Operator bundle version (semver)
default: 0.0.0
type: string
dnsOperatorVersion:
description: DNS Operator bundle version (X.Y.Z)
description: DNS Operator bundle version (semver)
default: 0.0.0
type: string
wasmShimVersion:
description: WASM Shim version (X.Y.Z)
description: WASM Shim version (semver)
default: 0.0.0
type: string
consolePluginVersion:
description: ConsolePlugin version (X.Y.Z)
default: "latest"
description: ConsolePlugin version (semver)
default: 0.0.0
type: string
prerelease:
description: Is the release a pre-release?
olmChannel:
description: OLM channel
required: false
type: boolean
type: string
default: "stable"

jobs:
auto-release:
Expand Down Expand Up @@ -81,27 +82,22 @@ jobs:
id: prepare-release
run: |
echo "Updating release.yaml with desired versions"
OLM_CHANNEL='stable'
if ${{ github.event.inputs.prerelease }}; then
OLM_CHANNEL='alpha'
fi
VERSION=${{ github.event.inputs.kuadrantOperatorVersion }} \
AUTHORINO_OPERATOR_VERSION=${{ github.event.inputs.authorinoOperatorVersion }} \
DNS_OPERATOR_VERSION=${{ github.event.inputs.dnsOperatorVersion }} \
LIMITADOR_OPERATOR_VERSION=${{ github.event.inputs.limitadorOperatorVersion }} \
CONSOLE_PLUGIN_VERSION=${{ github.event.inputs.consolePluginVersion }} \
WASM_SHIM_VERSION=${{ github.event.inputs.wasmShimVersion }} \
OLM_CHANNEL=${OLM_CHANNEL} \
OLM_CHANNEL=${{ github.event.inputs.olmChannel }} \
yq eval '(.kuadrant-operator.version = strenv(VERSION)) |
(.dependencies.authorino-operator = strenv(AUTHORINO_OPERATOR_VERSION)) |
(.dependencies.dns-operator = strenv(DNS_OPERATOR_VERSION)) |
(.dependencies.limitador-operator = strenv(LIMITADOR_OPERATOR_VERSION)) |
(.dependencies.console-plugin = strenv(CONSOLE_PLUGIN_VERSION)) |
(.dependencies.wasm-shim = strenv(WASM_SHIM_VERSION)) |
(.olm.default-channel = strenv(OLM_CHANNEL)) |
(.olm.channels[0] = strenv(OLM_CHANNEL))' -i ./release.yaml
(.olm.channels[0] = strenv(OLM_CHANNEL))' --inplace ./release.yaml
echo "release.yaml file updated as follows:"
Expand Down

0 comments on commit c391acd

Please sign in to comment.