diff --git a/.github/workflows/pr-bundle-diff-checks.yaml b/.github/workflows/pr-bundle-diff-checks.yaml index fb2d93bc5..fdf21b88d 100644 --- a/.github/workflows/pr-bundle-diff-checks.yaml +++ b/.github/workflows/pr-bundle-diff-checks.yaml @@ -16,11 +16,17 @@ jobs: name: Validate Bundle Manifests runs-on: ubuntu-latest timeout-minutes: 20 + permissions: + contents: write steps: - - name: Checkout + - name: Checkout PR branch uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.head_ref }} + # Use rhdh-bot token for same-repo PRs (enables push); falls back to default for forks + token: ${{ secrets.RHDH_BOT_TOKEN || github.token }} fetch-depth: 0 - name: Setup Go @@ -28,20 +34,43 @@ jobs: with: go-version-file: 'go.mod' - - name: Verify bundle manifests are up to date - run: | - make bundles build-installers + - name: Regenerate bundle manifests + run: make bundles build-installers - # Check if bundle manifests changed (ignoring createdAt timestamps) + - name: Check for changes + id: check + run: | # Since operator-sdk 1.26.0, `make bundle` changes the `createdAt` field from the bundle every time we run it. # The `git diff` below checks if only the createdAt field has changed. If it is the only change, it is ignored. # Inspired from https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1415350333 if git diff --quiet -I'^ createdAt: ' bundle config dist; then echo "✅ Bundle manifests are up to date" + echo "changed=false" >> "$GITHUB_OUTPUT" + else + echo "Bundle manifests are out of sync" + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Auto-commit and push updated bundle manifests + # Only attempt on same-repo PRs (not forks) for security; best-effort — failure falls through to the next step + if: steps.check.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository + continue-on-error: true + run: | + git config user.name "rhdh-bot" + git config user.email "rhdh-bot@redhat.com" + git add bundle/ config/ dist/ + git commit -m "chore: regenerate bundle manifests" + git push + + - name: Fail if bundle manifests are out of sync + if: steps.check.outputs.changed == 'true' + run: | + # Re-check in case the auto-commit step already pushed the fix + if git diff --quiet -I'^ createdAt: ' bundle config dist; then + echo "✅ Bundle manifests were auto-updated and pushed" exit 0 fi - # Bundle is out of sync - provide helpful error message echo "::error::Bundle manifests are out of sync with the code" echo "" echo "❌ The bundle manifests need to be regenerated." diff --git a/Makefile b/Makefile index 44bcbeaad..f8f08cf38 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ PROFILE_SHORT := $(shell echo $(PROFILE) | cut -d. -f1) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) # Set a default VERSION if it is not defined ifeq ($(origin VERSION), undefined) -VERSION ?= 0.11.0 +VERSION ?= 0.11.1 DEFAULT_VERSION := true else DEFAULT_VERSION := false diff --git a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml index 7bb172649..ccbda5202 100644 --- a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml @@ -25,13 +25,13 @@ metadata: } } ] - createdAt: "2026-07-07T19:20:23Z" + createdAt: "2026-07-09T11:05:27Z" description: Backstage Operator operators.operatorframework.io/builder: operator-sdk-v1.42.2 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 labels: operatorframework.io/arch.amd64: supported - name: backstage-operator.v0.11.0 + name: backstage-operator.v0.11.1 spec: apiservicedefinitions: {} customresourcedefinitions: @@ -215,7 +215,7 @@ spec: - --metrics-bind-address=:8443 command: - /manager - image: quay.io/rhdh-community/operator:0.11.0 + image: quay.io/rhdh-community/operator:0.11.1 livenessProbe: httpGet: path: /healthz @@ -326,4 +326,4 @@ spec: provider: name: Red Hat Inc. url: https://www.redhat.com/ - version: 0.11.0 + version: 0.11.1 diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index efa6a17fe..a93121edf 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -29,7 +29,7 @@ metadata: categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.11 - createdAt: "2026-07-07T19:20:26Z" + createdAt: "2026-07-09T11:05:28Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed @@ -54,7 +54,7 @@ metadata: labels: operatorframework.io/arch.amd64: supported operatorframework.io/arch.arm64: supported - name: rhdh-operator.v1.11.0 + name: rhdh-operator.v1.11.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -450,4 +450,4 @@ spec: - image: quay.io/rhdh-community/rhdh:next name: backstage replaces: rhdh-operator.v1.10.0 - version: 1.11.0 + version: 1.11.1 diff --git a/config/profile/backstage.io/kustomization.yaml b/config/profile/backstage.io/kustomization.yaml index bfe7f3482..d420430a0 100644 --- a/config/profile/backstage.io/kustomization.yaml +++ b/config/profile/backstage.io/kustomization.yaml @@ -14,7 +14,7 @@ resources: images: - name: controller newName: quay.io/rhdh-community/operator - newTag: 0.11.0 + newTag: 0.11.1 generatorOptions: disableNameSuffixHash: true diff --git a/dist/backstage.io/install.yaml b/dist/backstage.io/install.yaml index 801b2148e..e24590944 100644 --- a/dist/backstage.io/install.yaml +++ b/dist/backstage.io/install.yaml @@ -2796,7 +2796,7 @@ spec: - --metrics-bind-address=:8443 command: - /manager - image: quay.io/rhdh-community/operator:0.11.0 + image: quay.io/rhdh-community/operator:0.11.1 livenessProbe: httpGet: path: /healthz