From cecf5b82df6f8395314b7b95c3b04eaa053e260b Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:01:39 +0900 Subject: [PATCH] ci: add dispatch-push-event workflow Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- .github/workflows/dispatch-push-event.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/dispatch-push-event.yaml diff --git a/.github/workflows/dispatch-push-event.yaml b/.github/workflows/dispatch-push-event.yaml new file mode 100644 index 0000000000000..60ed9ec29816a --- /dev/null +++ b/.github/workflows/dispatch-push-event.yaml @@ -0,0 +1,30 @@ +name: dispatch-push-event +on: + push: + branches: + - beta/v0.3.** + +env: + DISPATCH_REPO: pilot-auto.x1.eve + +jobs: + dispatch-push-event: + runs-on: ubuntu-latest + + 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: Workflow Dispatch with curl command + run: | + curl -L \ + -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/${{ env.DISPATCH_REPO }}/actions/workflows/update-beta-branch.yaml/dispatches \ + -d '{"ref":"main"}'