From cff972c335fe9a45c1e305816fc060b205e234e0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Tue, 28 Nov 2023 16:11:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Automatically=20dispatch=20tasks?= =?UTF-8?q?=20to=20hf.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/python-api-export-tasks.yaml | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-api-export-tasks.yaml b/.github/workflows/python-api-export-tasks.yaml index d50d7952..25c6398f 100644 --- a/.github/workflows/python-api-export-tasks.yaml +++ b/.github/workflows/python-api-export-tasks.yaml @@ -1,8 +1,8 @@ name: Export tasks on: push: - branches: - - main + # branches: + # - main jobs: build: runs-on: ubuntu-latest @@ -21,4 +21,18 @@ 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='$(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 }} \ No newline at end of file