-
Notifications
You must be signed in to change notification settings - Fork 434
Run tasks-gen scripts automatically #964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2aa1734
Tasks - Update specs - first draft
Wauplin 3723ff9
move inside workflows folder
Wauplin 8bbdc01
new test
Wauplin 013b6d1
fix
Wauplin 75243da
concurrency
Wauplin a8c04f3
cosmetic
Wauplin 3acbd10
wording
Wauplin 9f67098
wording
Wauplin 00a833a
update token
Wauplin 8eaf132
remove author
Wauplin b6bb4f2
Merge branch 'main' into add-workflow-update-specs
Wauplin e26b3d3
add permissions section
paulinebm 1c056cb
Merge branch 'main' into add-workflow-update-specs
Wauplin 2a5bfa2
tasks gen
Wauplin d9c1ccc
Go
Wauplin 330d297
add cron job
Wauplin bac80ab
Merge branch 'main' into add-workflow-update-specs
Wauplin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
# 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: is this necessary?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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