-
Notifications
You must be signed in to change notification settings - Fork 278
49 lines (42 loc) · 1.73 KB
/
publish-versioned-api-ref.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }}