Skip to content

Update sync-all-readme.yml #36

Update sync-all-readme.yml

Update sync-all-readme.yml #36

name: Sync Profile README
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout profile repo
uses: actions/checkout@v3
- name: Copy README to other repos
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Verify README.md exists in .github/profile/
if [ ! -f profile/.github/profile/README.md ]; then
echo "Error: profile/.github/profile/README.md not found"
exit 1
fi
REPOS=("GKI_KernelSU_SUSFS" "Sultan_KernelSU_SUSFS" "OnePlus_KernelSU_SUSFS" "Pixel_KernelSU_SUSFS")
for REPO in "${REPOS[@]}"; do
echo "Processing $REPO..."
git clone https://github.com/WildKernels/$REPO.git $REPO
if [ $? -ne 0 ]; then
echo "Failed to clone $REPO"
continue
fi
cd $REPO
cp ../profile/.github/profile/README.md README.md
git config user.name "TheWildJames"
git config user.email "bins4us@hotmail.com"
git add README.md
git commit -m "Sync README from profile" || echo "No changes to commit in $REPO"
git push https://x-access-token:$GH_TOKEN@github.com/WildKernels/$REPO.git main
if [ $? -ne 0 ]; then
echo "Failed to push to $REPO"
fi
cd ..
rm -rf $REPO
done