chore(ci): bump checkout action version (#7166)

This commit is contained in:
Peter Feerick
2026-03-11 15:53:33 +10:00
committed by GitHub
parent 23217e4eaa
commit 2ca8e3e7b6
7 changed files with 23 additions and 23 deletions
+9 -9
View File
@@ -10,41 +10,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.SYNC_PAT }}
- name: Configure git
run: |
git config user.name "EdgeTX Sync Bot"
git config user.email "sync-bot@edgetx.org"
- name: Sync branches from upstream (hard reset)
env:
BRANCHES: "main 2.11" # Add/modify branches here as needed
run: |
git remote add upstream https://github.com/EdgeTX/edgetx.git
git fetch upstream
for branch in $BRANCHES; do
echo "=== Syncing branch: $branch ==="
# Check if upstream has this branch
if ! git ls-remote --heads upstream | grep -q "refs/heads/$branch"; then
echo "⚠️ Branch $branch does not exist in upstream, skipping..."
continue
fi
# Hard reset to upstream (creates exact copy with same SHA)
git checkout -B $branch upstream/$branch
# Force push to origin
git push origin $branch --force
echo "✓ Branch $branch synced (SHA: $(git rev-parse HEAD))"
done
echo ""
echo "=== Sync Complete ==="
echo "All specified branches are now exact copies of upstream"