Skip to content

Commit 93242e5

Browse files
authored
Merge pull request #1 from Craemon/sync
Sync
2 parents 9fc11ee + 5be29c8 commit 93242e5

5 files changed

Lines changed: 107 additions & 0 deletions

File tree

.github/workflows/sync-merge.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sync Shared Files to Datapack Branches
2+
3+
on:
4+
push:
5+
branches:
6+
- sync # Runs when pushing to the "sync" branch
7+
workflow_dispatch: # Allows manual execution from GitHub
8+
9+
jobs:
10+
merge-sync:
11+
name: Merge Sync into Datapack Branches
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Ensures full commit history is available
19+
20+
- name: Configure Git
21+
run: |
22+
git config --global user.name "github-actions"
23+
git config --global user.email "github-actions@github.com"
24+
25+
- name: Fetch all branches and sync
26+
run: |
27+
git fetch --all # Ensures all branches are fetched from origin
28+
29+
# List of all remote branches excluding `main` and `sync`
30+
BRANCHES=$(git branch -r | grep -Eo "origin/[^/]+" | sed 's/origin\///' | grep -vE '^(main|sync)$')
31+
32+
# Loop through each branch
33+
for branch in $BRANCHES; do
34+
echo "Merging sync into $branch..."
35+
36+
# Checkout the branch
37+
git checkout $branch
38+
39+
# Pull the latest changes from the remote branch
40+
git pull origin $branch --rebase # Using rebase to avoid merge commits
41+
42+
# Merge the sync branch into the current branch
43+
git merge --no-edit origin/sync || echo "No new changes to merge or merge conflict detected"
44+
45+
# If there's a conflict, handle it automatically (you can also choose to exit early if conflicts are too complex)
46+
if [ $? -ne 0 ]; then
47+
echo "Merge conflict detected, skipping the branch: $branch"
48+
continue
49+
fi
50+
51+
# Push the updated branch back to origin
52+
git push origin $branch
53+
done

LICENSE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ For permission requests or inquiries, please contact me: https://craemon.com/con
1717
Disclaimer: This license is valid as of 2025 and may be updated in the future. Users are encouraged to check for the latest version.
1818

1919
© 2025 Craemon - All Rights Reserved
20+
lol
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"display": {
3+
"icon": {
4+
"id": "minecraft:crafting_table"
5+
},
6+
"title": "Crafting",
7+
"description": "Craemon's crafting recipes",
8+
"frame": "goal",
9+
"show_toast": false,
10+
"announce_to_chat": false
11+
},
12+
"parent": "craemon:main",
13+
"criteria": {
14+
"tick": {
15+
"trigger": "minecraft:tick"
16+
}
17+
}
18+
}

data/craemon/advancement/main.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"display": {
3+
"icon": {
4+
"id": "minecraft:player_head",
5+
"components": {
6+
"minecraft:profile": {
7+
"id": [-1695811886,-244104360,-1872076634,2082508791],
8+
"properties": [
9+
{
10+
"name": "textures",
11+
"value": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzdlMjZhNDcyMWYwNjllMzUwYTQwZDExMDM3OTk3ZDliYjRiZWUzNGU1MTM3ODQ0ZDA2NDU5ODg5MzUyYzZiYiJ9fX0="
12+
}
13+
]
14+
}
15+
}
16+
},
17+
"title": "Craemon's Datapacks",
18+
"description": "https://modrinth.com/user/Craemon",
19+
"background": "minecraft:block/cyan_concrete",
20+
"frame": "challenge",
21+
"show_toast": false,
22+
"announce_to_chat": false
23+
},
24+
"criteria": {
25+
"tick": {
26+
"trigger": "minecraft:tick"
27+
}
28+
}
29+
}

pack.mcmeta

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"pack" : {
3+
"pack_format" : 71,
4+
"description" : "§e by §3 Craemon §e version §2 1.21.5"
5+
}
6+
}

0 commit comments

Comments
 (0)