Skip to content

Commit

Permalink
👷 Automatically dispatch tasks to hf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Nov 28, 2023
1 parent 3a64955 commit cff972c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/python-api-export-tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Export tasks
on:
push:
branches:
- main
# branches:
# - main
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,4 +21,18 @@ 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='$(python export_tasks.py)'" >> $GITHUB_ENV

- name: Debug
run: echo "${{ steps.export_tasks.outputs.payload }}"

# 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: ${{ steps.export_tasks.outputs.payload }}

0 comments on commit cff972c

Please sign in to comment.