Skip to content

Commit aa6b5ec

Browse files
authored
docs: migrate 4 README files to a single NRG template (#331)
1 parent 8c60ec7 commit aa6b5ec

6 files changed

Lines changed: 555 additions & 0 deletions

File tree

.github/workflows/nrg.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Regenerate READMEs
2+
on:
3+
push:
4+
branches: [master]
5+
paths:
6+
- 'README.src.md'
7+
- '.github/workflows/nrg.yml'
8+
pull_request:
9+
paths:
10+
- 'README.md'
11+
- 'README.cn.md'
12+
- 'README.ja.md'
13+
- 'README.ko.md'
14+
- 'README.src.md'
15+
permissions:
16+
contents: write
17+
jobs:
18+
regenerate:
19+
if: github.event_name == 'push'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
- uses: nanolaba/nrg-action@v1
26+
with:
27+
file: README.src.md
28+
nrg-version: '1.1'
29+
- name: Commit regenerated READMEs
30+
run: |
31+
if [ -n "$(git status --porcelain README.md README.cn.md README.ja.md README.ko.md)" ]; then
32+
git config user.name "github-actions[bot]"
33+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
34+
git add README.md README.cn.md README.ja.md README.ko.md
35+
git commit -m "docs: regenerate READMEs from README.src.md"
36+
git push
37+
fi
38+
drift-check:
39+
if: github.event_name == 'pull_request'
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: nanolaba/nrg-action@v1
44+
with:
45+
file: README.src.md
46+
mode: check
47+
nrg-version: '1.1'

README.cn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
<p align="center" style="margin-bottom: -10px"><a href="https://carbon.go-pkg.com/zh" target="_blank"><img src="https://carbon.go-pkg.com/logo.svg?v=2.6.x" width="15%" alt="carbon" /></a></p>
24

35
[![Carbon Release](https://img.shields.io/github/release/dromara/carbon.svg)](https://github.com/dromara/carbon/releases)

README.ja.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
<p align="center" style="margin-bottom: -10px"><a href="https://carbon.go-pkg.com/zh" target="_blank"><img src="https://carbon.go-pkg.com/logo.svg?v=2.6.x" width="15%" alt="carbon" /></a></p>
24

35
[![Carbon Release](https://img.shields.io/github/release/dromara/carbon.svg)](https://github.com/dromara/carbon/releases)

README.ko.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
<p align="center" style="margin-bottom: -10px"><a href="https://carbon.go-pkg.com/ko" target="_blank"><img src="https://carbon.go-pkg.com/logo.svg?v=2.6.x" width="15%" alt="carbon" /></a></p>
24

35
[![Carbon Release](https://img.shields.io/github/release/dromara/carbon.svg)](https://github.com/dromara/carbon/releases)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
<p align="center" style="margin-bottom: -10px"><a href="https://carbon.go-pkg.com/zh" target="_blank"><img src="https://carbon.go-pkg.com/logo.svg?v=2.6.x" width="15%" alt="carbon" /></a></p>
24

35
[![Carbon Release](https://img.shields.io/github/release/dromara/carbon.svg)](https://github.com/dromara/carbon/releases)

0 commit comments

Comments
 (0)