-
Notifications
You must be signed in to change notification settings - Fork 67
45 lines (42 loc) · 1.71 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
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: messaging-topology-operator
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- 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 ../messaging-topology-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="$(../messaging-topology-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
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,action,eventName
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()