Skip to content

Commit 557375c

Browse files
Create indexi-wiki.yml
1 parent f38499a commit 557375c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/indexi-wiki.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
name: Index Wiki
3+
4+
on:
5+
gollum:
6+
workflow_dispatch:
7+
8+
jobs:
9+
index:
10+
11+
name: Create Wiki Filesystem Index
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout wiki code from Github
16+
uses: actions/checkout@v3
17+
with:
18+
repository: ${{github.repository}}.wiki
19+
fetch-depth: 0
20+
21+
- name: Create index
22+
run: |
23+
git ls-files -z | xargs -0 -n1 -I{} -- git log -1 --format="{},%h,%aI,%aN,%aE" {} | \
24+
jq -Rs 'split("\n")[:-1] | map({
25+
file: (. | split(",")[0]),
26+
hash: (. | split(",")[1]),
27+
author_date: (. | split(",")[2]),
28+
author_name: (. | split(",")[3]),
29+
author_email: (. | split(",")[4]),
30+
})' > _Index.json
31+
32+
- name: Commit index
33+
uses: stefanzweifel/git-auto-commit-action@v4
34+
with:
35+
commit_message: Update Wiki Index

0 commit comments

Comments
 (0)