-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.01 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Deploy
on:
push:
branches: ["master", "main", "staging"]
jobs:
call-deployer:
runs-on: ubuntu-latest
steps:
- name: grindery-action-dispatcher token
id: grindery-action-dispatcher
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.DISPATCHER_APP_ID }}
private_key: ${{ secrets.DISPATCHER_APP_PRIVATE_KEY }}
- uses: actions/github-script@v6
env:
TARGET_REPO: ${{ secrets.DISPATCHER_TARGET_REPO }}
with:
github-token: ${{ steps.grindery-action-dispatcher.outputs.token }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: process.env.TARGET_REPO,
workflow_id: 'main.yml',
ref: 'main',
inputs: {
owner: context.repo.owner,
repo: context.repo.repo,
ref: process.env.GITHUB_REF_NAME,
},
});