File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync READMEs across branches
2+
3+ on :
4+ push :
5+ branches :
6+ - dev
7+ - 1.20.x
8+ - 1.21.x
9+ - 26.1.x
10+ paths :
11+ - README.md
12+ - README_FR.md
13+
14+ jobs :
15+ sync :
16+ if : ${{ !contains(github.event.head_commit.message, '[skip sync]') }}
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout source branch
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Configure git
25+ run : |
26+ git config user.name "github-actions[bot]"
27+ git config user.email "github-actions[bot]@users.noreply.github.com"
28+
29+ - name : Sync READMEs to all branches
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ run : |
33+ SOURCE_BRANCH="${GITHUB_REF#refs/heads/}"
34+ TARGETS=("dev" "1.20.x" "1.21.x" "26.1.x")
35+
36+ for target in "${TARGETS[@]}"; do
37+ if [ "$target" = "$SOURCE_BRANCH" ]; then
38+ continue
39+ fi
40+
41+ if git show-ref --verify --quiet refs/remotes/origin/"$target"; then
42+ git checkout "$target"
43+ git checkout "$SOURCE_BRANCH" -- README.md README_FR.md
44+ if ! git diff --cached --quiet; then
45+ git commit -m "docs: sync READMEs from $SOURCE_BRANCH [skip sync]"
46+ git push origin "$target"
47+ fi
48+ fi
49+ done
Original file line number Diff line number Diff line change 11# StackableTools (Kotlin Edition)
22
3- [ ![ Minecraft Version] ( https://img.shields.io/badge/Minecraft-1.21-blue.svg?style=for-the-badge&logo=minecraft )] ( https://www.minecraft.net/ )
4- [ ![ Minecraft Version] ( https://img.shields.io/badge/Minecraft-1.21.1-blue.svg?style=for-the-badge&logo=minecraft )] ( https://www.minecraft.net/ )
5- [ ![ Minecraft Version] ( https://img.shields.io/badge/Minecraft-1.21.4-blue.svg?style=for-the-badge&logo=minecraft )] ( https://www.minecraft.net/ )
6- [ ![ Minecraft Version] ( https://img.shields.io/badge/Minecraft-1.21.11-blue.svg?style=for-the-badge&logo=minecraft )] ( https://www.minecraft.net/ )
7-
8-
93[ ![ Fabric API] ( https://img.shields.io/badge/Loader-Fabric-orange.svg?style=for-the-badge )] ( https://fabricmc.net/ )
104[ ![ License] ( https://img.shields.io/badge/License-CC0_1.0-green.svg?style=for-the-badge )] ( https://github.com/yoanndev90/StackableTools/blob/master/LICENSE )
115[ ![ GitHub Release] ( https://img.shields.io/github/v/release/YoannDev90/StackableTools?style=for-the-badge )] ( https://github.com/yoanndev90/StackableTools/releases )
Original file line number Diff line number Diff line change 11# StackableTools (Édition Kotlin)
22
3- [ ![ Version Minecraft] ( https://img.shields.io/badge/Minecraft-1.21-1.21.11-blue.svg?style=for-the-badge&logo=minecraft )] ( https://www.minecraft.net/ )
43[ ![ Fabric API] ( https://img.shields.io/badge/Loader-Fabric-orange.svg?style=for-the-badge )] ( https://fabricmc.net/ )
54[ ![ Licence] ( https://img.shields.io/badge/License-CC0_1.0-green.svg?style=for-the-badge )] ( https://github.com/yoann/StackableTools/blob/master/LICENSE )
65[ ![ Release GitHub] ( https://img.shields.io/github/v/release/yoann/StackableTools?style=for-the-badge )] ( https://github.com/yoann/StackableTools/releases )
You can’t perform that action at this time.
0 commit comments