forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.03 KB
/
forked-helper.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: Forked Helper
run-name: Forked Helper dispatch on ${{ github.event_name }}
on:
push:
release:
deployment:
pull_request:
workflow_dispatch:
jobs:
dispatch-on-forked-repo:
name: 📢 Run repository dispatch on fork
env:
DISPATCH_SECRET: ${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}
if: ${{ github.repository_owner != 'armbian' }} # Run only on forks
runs-on: ubuntu-latest
steps:
- name: Dispatch event on forked repository
if: ${{ env.DISPATCH_SECRET != '' }} # Check that the secret has been set, if not, exit
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ env.DISPATCH_SECRET }}
repository: ${{ github.repository }}
event-type: armbian
client-payload: >
{
"event": "${{ github.event_name }}",
"ref": "${{ github.ref }}",
"base_ref": "${{ github.base_ref }}",
"sha": "${{ github.sha }}",
"event_details": ${{ toJSON(github.event) }}
}