forked from openconfig/featureprofiles
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.19 KB
/
wiki.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
name: Update Wiki
on:
push:
branches: [ main ]
jobs:
update-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: featureprofiles
- name: Checkout wiki
uses: actions/checkout@v2
with:
repository: "openconfig/featureprofiles.wiki"
path: featureprofiles.wiki
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.21.x
- name: Cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ github.job }}-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Build Wiki
run: |
pushd featureprofiles.wiki
git config --local user.email "[email protected]"
git config --local user.name "Github Action"
git rm -r testplans || true
popd
pushd featureprofiles
go run tools/wikidoc/wikidoc.go -feature_root feature/ -output_root ../featureprofiles.wiki
popd
pushd featureprofiles.wiki
git add .
git diff --quiet HEAD || git commit -m "Update wiki from featureprofiles" && git push
popd