From c978c0d893276833b5ac16cc68486961fe4d80ef Mon Sep 17 00:00:00 2001 From: kychen Date: Tue, 16 Dec 2025 15:25:59 +0800 Subject: [PATCH] fix: update CI workflow to trigger on pull requests and adjust subscription annotations --- .github/workflows/build.yml | 3 +-- pkg/operator/operatorhub/subscription.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b08c8ff..8d319f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,6 @@ name: Build and Publish Golang Binary on: push: - branches: [ main, develop ] tags: [ 'v*' ] paths: - 'main.go' @@ -37,7 +36,7 @@ jobs: contents: read actions: write - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request' steps: - name: Checkout code diff --git a/pkg/operator/operatorhub/subscription.go b/pkg/operator/operatorhub/subscription.go index 84da4d7..0475a7d 100644 --- a/pkg/operator/operatorhub/subscription.go +++ b/pkg/operator/operatorhub/subscription.go @@ -119,7 +119,7 @@ func (o *Operator) createSubscription(ctx context.Context, name, namespace, csv "name": name, "namespace": namespace, "annotations": map[string]interface{}{ - "cpaas.io/target-namespaces": namespace, + "cpaas.io/target-namespaces": "", }, "labels": map[string]interface{}{ "catalog": "platform",