File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/issues2md.yml
2+ name : Issues2Markdown
3+ on :
4+ push :
5+ schedule :
6+ # every day
7+ - cron : " 0 0 * * *"
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@master
13+ with :
14+ persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
15+ fetch-depth : 0 # otherwise, you will failed to push refs to dest repo
16+ - name : Backup github issues to a markdown file.
17+ run : |
18+ pip install wheel
19+ pip install --user gh2md
20+ $HOME/.local/bin/gh2md $GITHUB_REPOSITORY issues.md --token ${{ secrets.GITHUB_TOKEN }}
21+ git add issues.md
22+ - name : Commit files
23+ run : |
24+ git config --local user.email "action@github.com"
25+ git config --local user.name "GitHub Action"
26+ git commit -m "Backup all issues into issues.md" -a
27+ - name : Extract branch name
28+ shell : bash
29+ run : echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
30+ id : extract_branch
31+ - name : Push changes
32+ uses : ad-m/github-push-action@master
33+ with :
34+ github_token : ${{ secrets.GITHUB_TOKEN }}
35+ branch : ${{ steps.extract_branch.outputs.branch }}
You can’t perform that action at this time.
0 commit comments