From c655b5c93c10902d449f289b6c234b5a1297a40d Mon Sep 17 00:00:00 2001 From: Qing Lan Date: Wed, 15 May 2024 16:30:20 -0700 Subject: [PATCH] adding repo support --- .github/workflows/instant_benchmark.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/instant_benchmark.yml b/.github/workflows/instant_benchmark.yml index 0b8a48598a..419eff93ec 100644 --- a/.github/workflows/instant_benchmark.yml +++ b/.github/workflows/instant_benchmark.yml @@ -39,6 +39,11 @@ on: - none - table - cloudwatch + repo: + description: '[Do not change] The repo for runner registration' + required: false + type: string + default: 'djl-serving' workflow_call: inputs: running_template: @@ -59,6 +64,11 @@ on: required: false type: string default: 'none' + repo: + description: 'The repo for runner registration' + required: false + type: string + default: 'djl-serving' permissions: id-token: write @@ -73,10 +83,10 @@ jobs: run: | cd /home/ubuntu/djl_benchmark_script/scripts token=$( curl -X POST -H "Authorization: token ${{ secrets.ACTION_RUNNER_PERSONAL_TOKEN }}" \ - https://api.github.com/repos/deepjavalibrary/djl-serving/actions/runners/registration-token \ + https://api.github.com/repos/deepjavalibrary/${{ inputs.repo }}/actions/runners/registration-token \ --fail \ | jq '.token' | tr -d '"' ) - ./start_instance.sh action_ib_${{ inputs.instance }} $token djl-serving + ./start_instance.sh action_ib_${{ inputs.instance }} $token ${{ inputs.repo }} outputs: gpu_instance_id: ${{ steps.create_instance.outputs.action_ib_instance_id }}