-
Notifications
You must be signed in to change notification settings - Fork 40
97 lines (84 loc) · 4.04 KB
/
Copy pathsync-ecosystem.yml
File metadata and controls
97 lines (84 loc) · 4.04 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Weekly refresh of examples/ecosystem/* from upstream Clawflows & Agency-Agents Markdown.
# Converts via the same path as: ainl import clawflows / ainl import agency-agents
#
# PR creation: default GITHUB_TOKEN is enough on many repos. If your org disables
# "Actions can create/approve pull requests" for GITHUB_TOKEN, add a fine-scoped PAT
# as repository secret GH_PAT (repo scope). The workflow uses GH_PAT when set, else github.token.
# Upstream repos are only fetched over HTTPS as public raw URLs — no org access needed there.
name: Sync ecosystem (Clawflows & Agency-Agents)
on:
schedule:
- cron: "0 4 * * 1" # Monday 04:00 UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
issues: write # ensure-labels step (gh label create)
concurrency:
group: sync-ecosystem
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
env:
# Belt-and-suspenders with repo-root imports (see import steps using `python -m cli.main`).
PYTHONPATH: ${{ github.workspace }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# Avoid duplicate `Authorization` headers when create-pull-request configures HTTPS
# (checkout’s persisted PAT + action token → GitHub 400 "Duplicate header: Authorization").
persist-credentials: false
- name: Ensure GitHub labels exist (idempotent)
env:
GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
run: |
gh label create ecosystem --color "0E8A16" --description "Ecosystem examples / imports" 2>/dev/null || true
gh label create automation --color "5319E7" --description "Scheduled or bot-driven changes" 2>/dev/null || true
gh label create workflow --color "1D76DB" --description "Clawflows-style workflow contribution" 2>/dev/null || true
gh label create agent --color "FBCA04" --description "Agency-Agents-style agent contribution" 2>/dev/null || true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
# Editable install keeps parity with local dev; imports use `python -m cli.main` so
# sys.path includes the repo root (console script `ainl` alone can miss `tooling`).
- name: Install AINL
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Verify repo-root imports (same entry path as import steps)
working-directory: ${{ github.workspace }}
run: |
python -m cli.main check examples/hello.ainl >/dev/null
python -c "import tooling.graph_normalize; import compiler_v2; print('ok')"
- name: Import latest Clawflows samples
working-directory: ${{ github.workspace }}
run: |
python -m cli.main import clawflows \
--output-dir examples/ecosystem/clawflows \
--no-openclaw-bridge
- name: Import latest Agency-Agents samples
working-directory: ${{ github.workspace }}
run: |
python -m cli.main import agency-agents \
--output-dir examples/ecosystem/agency-agents \
--no-openclaw-bridge
- name: Open PR if ecosystem conversions changed
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT || github.token }}
commit-message: "chore: auto-sync upstream Clawflows & Agency-Agents conversions"
title: "chore: sync upstream Clawflows & Agency-Agents to AINL"
body: |
Automated sync of upstream Markdown → AINL under `examples/ecosystem/`.
- **Clawflows:** `examples/ecosystem/clawflows/*/original.md`, `converted.ainl`, `README.md`
- **Agency-Agents:** `examples/ecosystem/agency-agents/*/…`
Workflow: [`.github/workflows/sync-ecosystem.yml`](.github/workflows/sync-ecosystem.yml)
branch: auto-sync-ecosystem
delete-branch: true
labels: ecosystem, automation
add-paths: |
examples/ecosystem/**/*.md
examples/ecosystem/**/*.ainl