Skip to content

Update AI Models

Update AI Models #84

Workflow file for this run

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 }}