Skip to content

Commit

Permalink
ci: auto-update workflow (#3)
Browse files Browse the repository at this point in the history
* ci: auto-update workflow

* ci: use cron

* ci: remove --force
  • Loading branch information
henrycunh authored Jun 16, 2024
1 parent 3ef7f9c commit 6ff67e8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update model list

on:
schedule:
- cron: "0 */6 * * *"

jobs:
update:
name: Update model list
runs-on: ubuntu-latest

steps:

- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.BOT_ID }}
application_private_key: ${{ secrets.BOT_PRIVATE_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.auth.outputs.token }}

- name: Setup Bun
uses: oven-sh/setup-bun@v1


- name: Update model list
run: bun run scripts/index-model-info.ts

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: update model list"
commit_user_name: mojo-jojo-bot[bot]
commit_user_email: "${{ secrets.BOT_ID }}+mojo-jojo-bot[bot][bot]@users.noreply.github.com"

0 comments on commit 6ff67e8

Please sign in to comment.