Skip to content

Commit ced8226

Browse files
authored
Update sync-all-readme.yml
1 parent 576e72f commit ced8226

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/sync-all-readme.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,34 @@ jobs:
1111
steps:
1212
- name: Checkout profile repo
1313
uses: actions/checkout@v3
14+
with:
15+
path: profile
1416

1517
- name: Copy README to other repos
18+
env:
19+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1620
run: |
17-
REPOS=("GKI_KernelSU_SUSFS" "Sultan_KernelSU_SUSFS" "OnePlus_KernelSU_SUSFS" "Pixel_KernelSU_SUSFS") # Your repository name
21+
REPOS=("GKI_KernelSU_SUSFS" "Sultan_KernelSU_SUSFS" "OnePlus_KernelSU_SUSFS" "Pixel_KernelSU_SUSFS")
1822
1923
for REPO in "${REPOS[@]}"; do
20-
git clone https://github.com/WildKernels/$REPO.git
21-
cd $REPO
24+
echo "Processing $REPO..."
25+
git clone https://github.com/WildKernels/$REPO.git $REPO
26+
if [ $? -ne 0 ]; then
27+
echo "Failed to clone $REPO"
28+
continue
29+
fi
2230
31+
cd $REPO
2332
cp ../profile/README.md README.md
2433
git config user.name "TheWildJames"
2534
git config user.email "bins4us@hotmail.com"
2635
2736
git add README.md
28-
git commit -m "Sync README from profile" || echo "No changes to commit"
29-
git push https://$GITHUB_TOKEN@github.com/WildKernels/$REPO.git
37+
git commit -m "Sync README from profile" || echo "No changes to commit in $REPO"
38+
git push https://x-access-token:$GH_TOKEN@github.com/WildKernels/$REPO.git main
39+
if [ $? -ne 0 ]; then
40+
echo "Failed to push to $REPO"
41+
fi
3042
3143
cd ..
3244
rm -rf $REPO

0 commit comments

Comments
 (0)