-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.32 KB
/
generate-readme.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: Generate README.md
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
# workflows/*.yml 以下のファイルを取得し、### add-reviewer.yml\n\n```\nmkdir -p .github/workflows ; wget -O .github/workflows/add-reviewer.yml https://raw.githubusercontent.com/book000/templates/master/workflows/add-reviewer.yml\n``` のようにする
# .github/templates.md を取得し、 <!-- templates --> に挿入する
# README.md に書き込む
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Install dependencies
run: |
yarn add js-yaml
- name: Generate readme
run: |
node scripts/generate-readme.js
- name: Commit and push
if: github.event_name == 'push'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add README.md && \
git commit -m "feat: Update README.md" && \
git push || \
true
- name: Upload artifact
uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request'
with:
name: README.md
path: README.md