diff --git a/.github/workflows/python-api-export-tasks.yaml b/.github/workflows/python-api-export-tasks.yaml index d50d7952..7682c9c1 100644 --- a/.github/workflows/python-api-export-tasks.yaml +++ b/.github/workflows/python-api-export-tasks.yaml @@ -3,6 +3,7 @@ on: push: branches: - main + - transmit-payload-to-hfjs jobs: build: runs-on: ubuntu-latest @@ -21,4 +22,23 @@ jobs: with: python-version: ${{ matrix.python-version }} - - run: python scripts/export_tasks.py \ No newline at end of file + # run export_tasks.py and store output + - id: export_tasks + run: | + { + echo 'payload<> $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 }} + } \ No newline at end of file