From df0206922cd7597834e34a5b497b89a89aad677f Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Thu, 18 Jan 2024 03:30:52 +0000 Subject: [PATCH] Try a different action to dispatch workflow --- .github/workflows/binding-tests-extended.yml | 25 +++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/binding-tests-extended.yml b/.github/workflows/binding-tests-extended.yml index 4c680fec28..7575df71ce 100644 --- a/.github/workflows/binding-tests-extended.yml +++ b/.github/workflows/binding-tests-extended.yml @@ -11,6 +11,8 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +permissions: write-all + jobs: binding-refs: if: contains(github.event.pull_request.labels.*.name, 'PR-testing') @@ -23,14 +25,21 @@ jobs: needs: binding-refs if: contains(github.event.pull_request.labels.*.name, 'PR-testing') steps: + - name: Split owner/repo + id: split-repo + run: | + owner=$(echo "${{ needs.binding-refs.outputs.openjdk_binding_repo }}" | cut -d'/' -f1) + repo=$(echo "${{ needs.binding-refs.outputs.openjdk_binding_repo}}" | cut -d'/' -f2) + echo "owner=$owner" >> $GITHUB_OUTPUT + echo "repo=$repo" >> $GITHUB_OUTPUT - name: Invoke binding workflows - uses: aurelien-baudet/workflow-dispatch@v2 + uses: convictional/trigger-workflow-and-wait@v1.6.5 with: - repo: ${{ needs.binding-refs.outputs.openjdk_binding_repo }} + owner: ${{ steps.split-repo.outputs.owner }} + repo: ${{ steps.split-repo.outputs.repo }} ref: ${{ needs.binding-refs.outputs.openjdk_binding_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - workflow: test-core-extended.yml - inputs: '{ "mmtk-core-repo": "${{ github.repository }}", "mmtk-core-ref": "${{ github.sha }}" }' - wait-for-completion: true - wait-for-completion-timeout: 6h - wait-for-completion-interval: 5m + github_token: ${{ secrets.CI_ACCESS_TOKEN }} + workflow_file_name: test-core-extended.yml + client_payload: '{ "mmtk-core-repo": "${{ github.repository }}", "mmtk-core-ref": "${{ github.sha }}" }' + wait_workflow: true + wait_interval: 300