Skip to content

Commit 69099ac

Browse files
committed
ci: add sync workflow for atlas-project rule
1 parent aa7dcee commit 69099ac

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/sync-sources.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Sync Rule Sources
2+
3+
on:
4+
schedule:
5+
- cron: "0 */6 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: sync-sources
13+
cancel-in-progress: true
14+
15+
jobs:
16+
sync:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Sync atlas-project rule
23+
run: |
24+
curl -sfL \
25+
"https://raw.githubusercontent.com/UserGeneratedLLC/rojo/refs/heads/master/.cursor/rules/atlas-project.mdc" \
26+
-o atlas-project.mdc
27+
28+
- name: Commit and push
29+
run: |
30+
git config user.name "github-actions[bot]"
31+
git config user.email "github-actions[bot]@users.noreply.github.com"
32+
git add -A
33+
if git diff --staged --quiet; then
34+
echo "No changes to commit"
35+
else
36+
git commit -m "sync: update rule sources ($(date -u '+%Y-%m-%d %H:%M UTC'))"
37+
git push
38+
fi

0 commit comments

Comments
 (0)