forked from Effect-TS/effect-smol
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.79 KB
/
ai-codegen.yml
File metadata and controls
66 lines (54 loc) · 1.79 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
name: Nightly AI Codegen
on:
schedule:
- cron: "0 0 * * *" # Midnight UTC daily
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
codegen:
name: AI Codegen
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Install dependencies
uses: ./.github/actions/setup
- name: Run AI Codegen
run: node packages/tools/ai-codegen/src/bin.ts generate
- name: Check for changes
id: changes
run: |
# Only consider changes in packages/ai/
providers=$(git diff --name-only | grep "^packages/ai/" | cut -d'/' -f3 | sort -u | sed 's/^/- /' || true)
if [ -z "$providers" ]; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
{
echo "updated_providers<<EOF"
echo "$providers"
echo "EOF"
} >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore/ai-codegen-update
delete-branch: true
title: "chore: update AI codegen generated files"
body: |
Automated update of AI provider generated code.
## Updated Providers
${{ steps.changes.outputs.updated_providers }}
---
*This PR was automatically generated by the nightly codegen workflow.*
commit-message: "chore: regenerate AI provider code"
labels: automated