-
-
Notifications
You must be signed in to change notification settings - Fork 136
58 lines (46 loc) · 1.47 KB
/
Copy pathsync-manifest.yml
File metadata and controls
58 lines (46 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Sync Manifest
on:
push:
branches: [main]
paths:
- ".agents/**"
- "cli/generate-manifest.ts"
- ".release-please-manifest.json"
concurrency:
group: sync-manifest-${{ github.ref }}
cancel-in-progress: true
jobs:
sync-manifest:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Sync prompt-manifest.json
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
for attempt in 1 2 3; do
git fetch origin main
git reset --hard origin/main
VERSION=$(jq -r '.["."]' .release-please-manifest.json)
bunx tsx cli/generate-manifest.ts "$VERSION"
if git diff --quiet prompt-manifest.json; then
echo "prompt-manifest.json already up to date"
exit 0
fi
git add prompt-manifest.json
git commit -m "ci: sync prompt-manifest.json [skip ci]"
if git push origin HEAD:main; then
echo "Pushed on attempt $attempt"
exit 0
fi
echo "Push failed on attempt $attempt, retrying..."
sleep $((attempt * 5))
done
echo "Failed to sync prompt-manifest.json after 3 attempts"
exit 1