-
Notifications
You must be signed in to change notification settings - Fork 26
46 lines (36 loc) · 1.04 KB
/
update-models.yml
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
name: Update AI Models
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch: # Allows manual triggering
permissions:
contents: write
pull-requests: write
jobs:
update-models:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Fetch latest JSON file
run: node fetchLatestJson.js
- name: Run transformModels.js
run: node transformModels.js
- name: Commit and push changes
run: |
git config --global user.name 'Ahmet Dedeler'
git config --global user.email '[email protected]'
git add .
if git commit -m 'Update AI models'; then
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}