armbian-build/.github/workflows/forked-helper.yml
ColorfulRhino 28e859f7ce actions: forked-helper: Don't escape multiline strings
Not needed anymore with GITHUB_OUTPUT.
See https://github.com/orgs/community/discussions/26288#discussioncomment-3876281

Instead, use the `toJSON` function that Actions offers to convert the `event` object to JSON.
2024-07-18 11:43:38 +02:00

36 lines
1.1 KiB
YAML

name: Forked Helper
run-name: Forked Helper dispatch on ${{ github.event_name }}
on:
push:
release:
deployment:
pull_request:
workflow_dispatch:
jobs:
fork-repository-dispatch:
name: 📢 Run repository dispatch to default fork branch
if: ${{ github.repository_owner != 'armbian' }}
runs-on: ubuntu-latest
steps:
- name: Assign secret
id: get_dispatch_secret
run: echo "dispatch_secret=${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}" >> $GITHUB_OUTPUT
- name: Dispatch event on forked repostitory
if: steps.get_dispatch_secret.outputs.dispatch_secret
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.get_dispatch_secret.outputs.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) }}
}