Skip to content

Fix olm action (#1812) #32

Fix olm action (#1812)

Fix olm action (#1812) #32

name: "Publish Versioned API Reference Wiki page"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish-versioned-api-reference:
name: Publish Versioned API Reference Wiki
runs-on: ubuntu-latest
steps:
- name: Checkout operator codebase
uses: actions/checkout@v4
with:
path: cluster-operator
- name: Get the version
id: get_version
run: echo VERSION=${GITHUB_REF#refs/tags/} >> "$GITHUB_OUTPUT"
- name: Checkout wiki codebase
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: wiki
- name: Push to wiki
run: |
cd wiki
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
# Add the versioned API Reference to the Wiki
cp ../cluster-operator/docs/api/rabbitmq.com.ref.asciidoc ./API_Reference_${{ steps.get_version.outputs.VERSION }}.asciidoc
# Regenerate the ordered list of API Reference docs for the sidebar
export REGENERATED_SIDEBAR="$(../cluster-operator/hack/generate-ordered-api-reference-list.sh .)"
echo "$REGENERATED_SIDEBAR" > Wiki_Sidebar.md
git add ./API_Reference_${{ steps.get_version.outputs.VERSION }}.asciidoc
git add ./Wiki_Sidebar.md
git commit -m "Publish version ${{ steps.get_version.outputs.VERSION }} API Reference" && git push
- name: Notify Google Chat
if: failure()
uses: SimonScholz/google-chat-action@main
with:
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}'
jobStatus: ${{ job.status }}
title: Cluster Operator - ${{ github.workflow }}