Skip to content

Commit

Permalink
adding back replaces field on operatorhub publication
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielePalaia committed Jan 27, 2025
1 parent 0cb65ca commit 007c671
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/testing_and_publishing_OLM_bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
name: Test & Publish OLM Package

on:
release:
types: [published]
push:
branches:
- add_replace_field_on_olm_operatorhub

workflow_dispatch:
inputs:
bundle_version:
description: 'The version of the bundle in format 1.2.3 (do not prefix with "v")'
default: ""
default: "0.0.0"
required: false
type: string

Expand Down Expand Up @@ -183,7 +184,7 @@ jobs:
name: Create branch for OperatorHub PR
runs-on: ubuntu-latest
needs: test-olm-package
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
#if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Checkout community-operators fork (OperatorHub)
uses: actions/checkout@v4
Expand All @@ -209,7 +210,10 @@ jobs:
git branch rabbitmq-cluster-operator-$BUNDLE_VERSION
git checkout rabbitmq-cluster-operator-$BUNDLE_VERSION
REPLACE_VERSION=$(ls -1v /operators/rabbitmq-cluster-operator/ | tail -2 | head -1)
cp -v -fR olm-package-ci/"$BUNDLE_VERSION" ./operators/rabbitmq-cluster-operator/
sed -i -e "s/replaces: null/replaces: rabbitmq-cluster-operator.v$REPLACE_VERSION/g" /operators/rabbitmq-cluster-operator/$BUNDLE_VERSION/manifests/rabbitmq.clusterserviceversion.yaml
sed -i -e "s/latest/$BUNDLE_VERSION/g" ./operators/rabbitmq-cluster-operator/$BUNDLE_VERSION/manifests/rabbitmq.clusterserviceversion.yaml
git add operators/rabbitmq-cluster-operator
git commit -s -m "RabbitMQ Operator release $BUNDLE_VERSION"
Expand All @@ -219,7 +223,7 @@ jobs:
name: Create branch for Openshift marketplace PR
runs-on: ubuntu-latest
needs: test-olm-package
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
#if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Checkout community-operators-prod fork (Openshift Ecosystem)
uses: actions/checkout@v4
Expand Down

0 comments on commit 007c671

Please sign in to comment.