Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/python-api-export-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- transmit-payload-to-hfjs
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,4 +22,23 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- run: python scripts/export_tasks.py
# run export_tasks.py and store output
- id: export_tasks
run: |
{
echo 'payload<<XXX_MULTI_LINE_MARKER_XXX'
python scripts/export_tasks.py
echo 'XXX_MULTI_LINE_MARKER_XXX'
} >> $GITHUB_OUTPUT

# Dispatch to huggingface/huggingface.js repo
- name: Dispatch to huggingface/huggingface.js
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
repository: huggingface/huggingface.js
event-type: export-tasks
client-payload: |
{
"tasks": ${{ steps.export_tasks.outputs.payload }}
Copy link
Member

Choose a reason for hiding this comment

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

Nice! How is this payload received and interpreted in the remote repo, is that already in place?

Copy link
Member Author

Choose a reason for hiding this comment

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

now that the PR is approved as soon as #355 (comment) is handled will work on it

we need to create a github workflow with repository_dispatch on hf.js

}