10000 Chenging upstream synx logic · StrandForge/sdk-python@ea5485a · GitHub
[go: up one dir, main page]

Skip to content

Commit ea5485a

Browse files
Sugi VenugeethanSugi Venugeethan
authored andcommitted
Chenging upstream synx logic
1 parent 38cabd0 commit ea5485a

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/sync-upstream.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,23 @@ on:
33
schedule:
44
- cron: '0 0 * * *' # Daily sync
55
workflow_dispatch: # Manual trigger
6+
67
jobs:
78
sync:
89
runs-on: ubuntu-latest
9-
permissions:
10-
contents: write # Add explicit permission to write to repository contents
1110
steps:
1211
- name: Checkout
1312
uses: actions/checkout@v4
1413
with:
15-
fetch-depth: 0 # Fetch all history for proper merging
16-
token: ${{ secrets.GITHUB_TOKEN }} # Use the GitHub token with appropriate permissions
14+
token: ${{ secrets.PAT_TOKEN }} # Required for push access
15+
fetch-depth: 0
16+
1717
- name: Sync upstream
1818
run: |
1919
git config user.name "StrandForge Bot"
2020
git config user.email "bot@strandforge.ai"
2121
git remote add upstream https://github.com/strands-agents/sdk-python.git
2222
git fetch upstream
2323
git checkout base-main
24-
25-
# Try normal merge first
26-
if ! git merge upstream/main --no-edit; then
27-
# If normal merge fails, try with allow-unrelated-histories
28-
echo "Normal merge failed, attempting with --allow-unrelated-histories"
29-
git merge upstream/main --allow-unrelated-histories --no-edit || {
30-
echo "Merge failed. There might be conflicts that need manual resolution."
31-
exit 1
32-
}
33-
fi
34-
35-
git push origin base-main
24+
git merge upstream/main --no-edit
25+
git push origin base-main

0 commit comments

Comments
 (0)
0