Skip to content

Commit a1f50ea

Browse files
authored
ci: fix permission issue in workflow (#10)
1 parent ef29e88 commit a1f50ea

1 file changed

Lines changed: 5 additions & 24 deletions

File tree

.github/workflows/trigger-workflow.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [ "main" ]
66

77
schedule:
8-
- cron: '0 13 * * *'
8+
- cron: '0 12 * * *'
99

1010
workflow_dispatch:
1111

@@ -26,33 +26,14 @@ jobs:
2626
with:
2727
python-version: '3.12'
2828

29-
- name: Download and run collect_worktree_info.py
29+
- name: Download and run generate_worktree_info.py
3030
run: |
3131
# Download the script
32-
curl -o collect_worktree_info.py https://raw.githubusercontent.com/HITSZ-OpenAuto/repos-management/main/scripts/collect_worktree_info.py
32+
curl -o /tmp/generate_worktree_info.py https://raw.githubusercontent.com/HITSZ-OpenAuto/repos-management/main/scripts/generate_worktree_info.py
3333
3434
# Make it executable and run it
35-
chmod +x collect_worktree_info.py
36-
python3 collect_worktree_info.py
37-
38-
# Clean up the downloaded script
39-
rm collect_worktree_info.py
40-
41-
- name: Commit worktree info changes
42-
run: |
43-
# Configure git
44-
git config --local user.email "action@github.com"
45-
git config --local user.name "GitHub Actions"
46-
47-
# Add changes if any exist
48-
if [ -n "$(git status --porcelain)" ]; then
49-
git add .hoa/worktree.json
50-
git commit -m "Update worktree [skip ci]"
51-
git push origin main
52-
echo "Worktree updated and committed to main branch"
53-
else
54-
echo "No changes to commit"
55-
fi
35+
chmod +x /tmp/generate_worktree_info.py
36+
python3 /tmp/generate_worktree_info.py
5637
5738
- name: Trigger workflow in hoa-moe
5839
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)