From 20bf62662729d057dbfba19060d6d6a318528f9e Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:22:18 +0900 Subject: [PATCH 01/15] feat(ci): add dispatch-sim-evaluation-tools.yaml --- .../dispatch-sim-evaluation-tools.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/dispatch-sim-evaluation-tools.yaml diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml new file mode 100644 index 0000000000000..39d87cd5138a8 --- /dev/null +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -0,0 +1,19 @@ +name: dispatch-sim-evaluation-tools +on: + pull_request: + types: [labeled] + +jobs: + make_dispatch_event: + runs-on: ubuntu-latest + if: github.event.label.name == 'execute-autoware-evaluator' + steps: + - name: trigger + run: | + curl \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GH_PAT }}"\ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches \ + -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }}' From 4c1475e66a7e153633002f5b4da0f3a920072cc2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 11:24:43 +0000 Subject: [PATCH 02/15] style(pre-commit): autofix --- .../dispatch-sim-evaluation-tools.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 39d87cd5138a8..0844fc6ec41c9 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest if: github.event.label.name == 'execute-autoware-evaluator' steps: - - name: trigger - run: | - curl \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GH_PAT }}"\ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches \ - -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }}' + - name: trigger + run: | + curl \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GH_PAT }}"\ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches \ + -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }}' From 82897c98a8ade81d4794c0aa055ae4fd31f38bff Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:29:21 +0900 Subject: [PATCH 03/15] fix: use generated token --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 0844fc6ec41c9..c0ef99b57d7cb 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -8,12 +8,18 @@ jobs: runs-on: ubuntu-latest if: github.event.label.name == 'execute-autoware-evaluator' steps: + - name: generate token + id: generate-token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} - name: trigger run: | curl \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GH_PAT }}"\ + -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches \ -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }}' From cea4ecdd76cae30b0e86b99cae75aa99a33e810d Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:36:08 +0900 Subject: [PATCH 04/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index c0ef99b57d7cb..496eb46bb8386 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -19,7 +19,7 @@ jobs: curl \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}"\ + -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches \ - -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }}' + "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ + -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":"${{ toJSON(github.event.pull_request) }}" }}' From ce4dbac45c33da32c894f40233a75efda713d90f Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:37:38 +0900 Subject: [PATCH 05/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 496eb46bb8386..0c6eabbb6b4ec 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -19,7 +19,7 @@ jobs: curl \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ + -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":"${{ toJSON(github.event.pull_request) }}" }}' From 42236cc71fad681d0325b350d6cc7c6ff00e421d Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:48:45 +0900 Subject: [PATCH 06/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 0c6eabbb6b4ec..bf771bc05f2ac 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -22,4 +22,4 @@ jobs: -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":"${{ toJSON(github.event.pull_request) }}" }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ toJSON(github.event.pull_request) }}" }}' From e3fc5d85eca554c99b9ddf3c7984de9c52d6bd23 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 20:50:34 +0900 Subject: [PATCH 07/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index bf771bc05f2ac..7e594097242fd 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -22,4 +22,4 @@ jobs: -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ toJSON(github.event.pull_request) }}" }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ github.event.pull_request }}" }}' From b15c028f00eced94c071241c73ba1e12afe9c891 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 21:09:22 +0900 Subject: [PATCH 08/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 7e594097242fd..a9a776d7bf469 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -15,6 +15,8 @@ jobs: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - name: trigger + env: + pull_request_info: ${{ toJSON(github.event.pull_request) }} run: | curl \ -X POST \ @@ -22,4 +24,4 @@ jobs: -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ github.event.pull_request }}" }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${pull_request_info}" }}' From 49d7ea683a17a14f47f527930bfc558b1db6a6dd Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 21:15:42 +0900 Subject: [PATCH 09/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index a9a776d7bf469..2b855527ecbf8 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -21,7 +21,7 @@ jobs: curl \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ + -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${pull_request_info}" }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ pull_request_info }}" }}' From d303a677b152b3dead9a414b3f28196250617260 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Fri, 28 Jul 2023 21:33:26 +0900 Subject: [PATCH 10/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 2b855527ecbf8..201120acada17 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -24,4 +24,4 @@ jobs: -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${{ pull_request_info }}" }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":'${pull_request_info}' }}' From e0e9eae5966dc905163148247cf2fa0e67c26e60 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Thu, 3 Aug 2023 11:47:30 +0900 Subject: [PATCH 11/15] Update .github/workflows/dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 201120acada17..6e96745dd795b 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -24,4 +24,6 @@ jobs: -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":'${pull_request_info}' }}' + -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${pull_request_info}" }}' + + From 6a60083e04b5b473515f2cc0e5eb5b131f5475f5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 02:49:01 +0000 Subject: [PATCH 12/15] style(pre-commit): autofix --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 6e96745dd795b..516a341a3b1e0 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -25,5 +25,3 @@ jobs: -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${pull_request_info}" }}' - - From 072b3b2d40dd7c225aa1becb6f3fc5fe63dee4df Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Thu, 3 Aug 2023 13:12:21 +0900 Subject: [PATCH 13/15] Update .github/workflows/dispatch-sim-evaluation-tools.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ぐるぐる --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 516a341a3b1e0..d18ca84d4b9ad 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -14,6 +14,7 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} + repository: tier4/sim_evaluation_tools_test - name: trigger env: pull_request_info: ${{ toJSON(github.event.pull_request) }} From 67859e82b62a6487d7fa55081be1a303a68d95b4 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Tue, 8 Aug 2023 14:44:34 +0900 Subject: [PATCH 14/15] Update dispatch-sim-evaluation-tools.yaml --- .github/workflows/dispatch-sim-evaluation-tools.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index d18ca84d4b9ad..516a341a3b1e0 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -14,7 +14,6 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - repository: tier4/sim_evaluation_tools_test - name: trigger env: pull_request_info: ${{ toJSON(github.event.pull_request) }} From d66e007a2ed7d87f291c206fa3da15da143cbab8 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Mon, 21 Aug 2023 17:20:24 +0900 Subject: [PATCH 15/15] Update dispatch-sim-evaluation-tools.yaml --- .../dispatch-sim-evaluation-tools.yaml | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dispatch-sim-evaluation-tools.yaml b/.github/workflows/dispatch-sim-evaluation-tools.yaml index 516a341a3b1e0..247223cc83fa0 100644 --- a/.github/workflows/dispatch-sim-evaluation-tools.yaml +++ b/.github/workflows/dispatch-sim-evaluation-tools.yaml @@ -14,14 +14,24 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - - name: trigger + - name: trigger without launcher + if: ! contains(github.event.issue.labels.*.name, 'launcher') + uses: peter-evans/repository-dispatch@v2 env: pull_request_info: ${{ toJSON(github.event.pull_request) }} - run: | - curl \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/repos/tier4/sim_evaluation_tools_test/dispatches" \ - -d '{"event_type":"pull_request_notification","client_payload":{"config":"autoware","pr":"${pull_request_info}" }}' + with: + token: ${{ steps.generate-token.outputs.token }} + repository: tier4/sim_evaluation_tools_test + event-type: pull_request_notification + client-payload: '{"branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }' + + - name: trigger with launcher + if: contains(github.event.issue.labels.*.name, 'launcher') + uses: peter-evans/repository-dispatch@v2 + env: + pull_request_info: ${{ toJSON(github.event.pull_request) }} + with: + token: ${{ steps.generate-token.outputs.token }} + repository: tier4/sim_evaluation_tools_test + event-type: pull_request_notification + client-payload: '{"branch_opts": "autoware/launcher={branch}", "branch_name":"${{ github.event.pull_request.head.ref }}","pr":${{ toJSON(github.event.pull_request) }} }'