From 5c22fb960d94cfeb5e23ba73830dfbb7fbbb73e7 Mon Sep 17 00:00:00 2001 From: Kowyo <110339237+kowyo@users.noreply.github.com> Date: Sun, 17 Nov 2024 13:06:34 +0800 Subject: [PATCH] ci: update workflow to enable single page build (#7) --- .github/workflows/trigger-workflow.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trigger-workflow.yml b/.github/workflows/trigger-workflow.yml index 84a2d1d..fd728cd 100644 --- a/.github/workflows/trigger-workflow.yml +++ b/.github/workflows/trigger-workflow.yml @@ -1,4 +1,4 @@ -name: Trigger Workflow in hoa.moe +name: Trigger Workflow in hoa-moe on: push: @@ -9,12 +9,14 @@ jobs: trigger: runs-on: ubuntu-latest steps: - - name: Trigger workflow in hoa.moe + - name: Trigger workflow in hoa-moe env: GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | + REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2) + echo ${REPO_NAME} curl -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token $GITHUB_TOKEN" \ - https://api.github.com/repos/HITSZ-OpenAuto/hoa.moe/actions/workflows/course.yaml/dispatches \ - -d '{"ref":"main"}' + https://api.github.com/repos/HITSZ-OpenAuto/hoa-moe/actions/workflows/course-single.yaml/dispatches \ + -d '{"ref":"main","inputs": {"repo_name": "'"${REPO_NAME}"'"}}'