-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (43 loc) · 1.5 KB
/
sync_issues.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
name: sync issues to markdown
on:
issues:
types: [opened, edited, labeled]
jobs:
issue2md:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.backup-last-commit.outputs.commit_hash }}
steps:
- uses: actions/checkout@v4
- name: print github event action
run: |
echo "${{ github.event.action }}"
- uses: junxnone/wiki_issue2md@main
with:
branch: "main" # default to main
dir: "docs" # default to _posts
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
created_at: ${{ github.event.issue.created_at }}
updated_at: ${{ github.event.issue.updated_at }}
label_name: ${{ join(github.event.issue.labels.*.name, ', ') }}
title: ${{ github.event.issue.title }}
body: ${{ github.event.issue.body }}
number: ${{ github.event.issue.number }}
actor: ${{ github.actor }}
nohead: ${{ contains(github.event.issue.labels.*.name, 'nohead') }}
- name: Backup last commit
id: backup-last-commit
run: |
echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
update_sidebar:
needs: issue2md
runs-on: ubuntu-latest
steps:
- uses: junxnone/autosidebar@main
with:
push_branch: "main"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
actor: ${{ github.actor }}
docs_path: "docs"
root_node: ${{ github.event.repository.name }}
ref: ${{ needs.issue2md.outputs.commit_hash }}