Skip to content
Merged
63 changes: 63 additions & 0 deletions .github/workflows/update-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Tasks - Update specs

on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *" # Every day at 3am

concurrency:
group: update-specs
cancel-in-progress: true

defaults:
run:
working-directory: packages/tasks-gen

jobs:
pull_request:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: true

# Generate specs
- run: pnpm run inference-tgi-import
- run: pnpm run inference-tei-import
- run: pnpm run inference-codegen

# Check changes
- run: git status

Comment on lines +35 to +37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is this necessary?

Copy link
Contributor Author

@Wauplin Wauplin Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary not but nice to have I think.
Since we are opening automated PRs, I'd not be surprised if at some point in the future the CI breaks for a reason. Having a git status in the logs doesn't cost much and might be helpful for quick investigations

# Create or update Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.TOKEN_INFERENCE_SYNC_BOT }}
commit-message: Update tasks specs (automated commit)
branch: update-tasks-specs-automated-pr
delete-branch: true
title: "[Bot] Update tasks specs"
body: |
This PR updates the @huggingface/tasks specs. It has been generated by running:
```sh
pnpm run inference-tgi-import
pnpm run inference-tei-import
pnpm run inference-codegen
```

This PR was automatically created by the [Tasks - Update specs workflow](https://github.com/huggingface/huggingface.js/blob/main/.github/update-specs.yml).

Make sure the changes are correct before merging.
labels: |
tasks
specs
reviewers: |
Wauplin
hanouticelina
Loading