chore(deps): update quay.io/prometheus/prometheus Docker tag to v3.13… #62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Prometheus Operator Bundle | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'component-settings.yaml' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Prometheus Operator version (e.g., v0.89.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-bundle: | |
| name: Update Prometheus Operator Bundle | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create GitHub App token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 | |
| id: app-token | |
| with: | |
| app-id: 1312871 | |
| private-key: ${{ secrets.OPENMCP_CI_APP_PRIVATE_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| fetch-depth: 0 | |
| - name: Determine target version | |
| id: version | |
| run: | | |
| if [ -n "${{ github.event.inputs.version }}" ]; then | |
| # Manual workflow dispatch with version | |
| VERSION="${{ github.event.inputs.version }}" | |
| else | |
| # Extract version from component-settings.yaml | |
| VERSION=$(grep 'PROMETHEUS_OPERATOR_IMAGE_VERSION:' component-settings.yaml | sed 's/.*"\(v[0-9.]*\)".*/\1/') | |
| fi | |
| # Remove 'v' prefix if present for comparison | |
| VERSION_NUMBER="${VERSION#v}" | |
| echo "target_version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "version_number=$VERSION_NUMBER" >> $GITHUB_OUTPUT | |
| echo "Target version: $VERSION" | |
| echo "Version number: $VERSION_NUMBER" | |
| - name: Download new bundle.yaml | |
| run: | | |
| echo "Downloading bundle.yaml for version ${{ steps.version.outputs.target_version }}" | |
| curl -fsSL \ | |
| "https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${{ steps.version.outputs.target_version }}/bundle.yaml" \ | |
| -o /tmp/bundle.yaml | |
| # Verify the file was downloaded and is not empty | |
| if [ ! -s /tmp/bundle.yaml ]; then | |
| echo "Error: Downloaded bundle.yaml is empty or does not exist" | |
| exit 1 | |
| fi | |
| # Verify it contains the expected version | |
| if ! grep -q "operator.prometheus.io/version: ${{ steps.version.outputs.version_number }}" /tmp/bundle.yaml; then | |
| echo "Warning: Downloaded bundle.yaml does not contain expected version annotation" | |
| echo "Expected: operator.prometheus.io/version: ${{ steps.version.outputs.version_number }}" | |
| echo "File content preview:" | |
| head -50 /tmp/bundle.yaml | |
| exit 1 | |
| fi | |
| - name: Update operator.yaml with new bundle | |
| run: | | |
| # Create a new file with the header | |
| cat > kustomizations/prometheus-operator/operator.yaml <<'EOF' | |
| # Source: https://github.com/prometheus-operator/prometheus-operator/blob/main/bundle.yaml | |
| # This file is tracked by Renovate for automatic updates | |
| # renovate: datasource=github-releases depName=prometheus-operator/prometheus-operator | |
| EOF | |
| # Append the downloaded bundle content | |
| cat /tmp/bundle.yaml >> kustomizations/prometheus-operator/operator.yaml | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet kustomizations/prometheus-operator/operator.yaml; then | |
| echo "No changes detected in operator.yaml" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected in operator.yaml" | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| author: "openmcp-ci[bot] <213051267+openmcp-ci[bot]@users.noreply.github.com>" | |
| committer: "openmcp-ci[bot] <213051267+openmcp-ci[bot]@users.noreply.github.com>" | |
| commit-message: | | |
| chore(deps): update prometheus-operator bundle to ${{ steps.version.outputs.target_version }} | |
| branch: chore/prometheus-operator-bundle-${{ steps.version.outputs.version_number }} | |
| delete-branch: true | |
| title: 'chore(deps): update prometheus-operator bundle to ${{ steps.version.outputs.target_version }}' | |
| body: | | |
| ## Prometheus Operator Bundle Update | |
| This PR updates the Prometheus Operator bundle.yaml to version **${{ steps.version.outputs.target_version }}**. | |
| ### Changes | |
| - Updated `kustomizations/prometheus-operator/operator.yaml` with the latest bundle from upstream | |
| - Source: https://github.com/prometheus-operator/prometheus-operator/blob/${{ steps.version.outputs.target_version }}/bundle.yaml | |
| ### Verification Checklist | |
| - [ ] Review the changes to ensure CRDs and RBAC are compatible | |
| - [ ] Test the deployment in a development environment | |
| - [ ] Check for any breaking changes in the [release notes](https://github.com/prometheus-operator/prometheus-operator/releases/tag/${{ steps.version.outputs.target_version }}) | |
| --- | |
| 🤖 This PR was automatically created by the [update-prometheus-operator-bundle workflow](.github/workflows/update-prometheus-operator-bundle.yaml) | |
| labels: | | |
| dependencies | |
| prometheus | |
| automated | |
| draft: false |