Skip to content

Commit

Permalink
ci: add dispatch-push-event workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Keisuke Shima <[email protected]>
  • Loading branch information
KeisukeShima committed Sep 5, 2023
1 parent c01ba62 commit cecf5b8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dispatch-push-event.yaml
Original file line number Diff line number Diff line change
@@ -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"}'

0 comments on commit cecf5b8

Please sign in to comment.