Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 2f5286d

Browse files
committed
feat: change tool specs generation to run daily
1 parent bb33166 commit 2f5286d

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

.github/workflows/generate-tool-specs.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Generate Tool Specifications
22

33
on:
4-
release:
5-
types: [published]
4+
schedule:
5+
# Run at midnight UTC every day
6+
- cron: '0 0 * * *'
67
# Allow manual triggering of the workflow
78
workflow_dispatch:
89

10+
permissions:
11+
contents: write
12+
913
jobs:
1014
generate-specs:
1115
runs-on: ubuntu-latest
16+
outputs:
17+
specs_changed: ${{ steps.check_changes.outputs.specs_changed }}
1218
steps:
1319
- name: Checkout code
1420
uses: actions/checkout@v4
@@ -34,7 +40,30 @@ jobs:
3440
git remote add upstream https://github.com/crewAIInc/crewAI.git
3541
git fetch upstream
3642
37-
- name: Commit and push if changed
43+
- name: Check for changes in tool specifications
44+
id: check_changes
3845
run: |
3946
git add tool.specs.json
40-
git diff --quiet && git diff --staged --quiet || (git commit -m "Update tool specifications for $(git describe --tags --abbrev=0)" && git push)
47+
if git diff --quiet --staged; then
48+
echo "No changes detected in tool.specs.json"
49+
echo "specs_changed=false" >> $GITHUB_OUTPUT
50+
else
51+
echo "Changes detected in tool.specs.json"
52+
echo "specs_changed=true" >> $GITHUB_OUTPUT
53+
fi
54+
55+
- name: Commit and push if changed
56+
if: steps.check_changes.outputs.specs_changed == 'true'
57+
run: |
58+
git commit -m "Update tool specifications for $(git describe --tags --abbrev=0)"
59+
git push
60+
61+
notify-api:
62+
needs: generate-specs
63+
if: needs.generate-specs.outputs.specs_changed == 'true'
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Notify API about tool specification update
67+
run: |
68+
curl -X POST https://app.crewai.com/crewai_plus/api/v1/tool_releases \
69+
-H "Content-Type: application/json"

0 commit comments

Comments
 (0)