John Doe 9eeddc4990
fix
2021-10-21 17:49:20 +08:00

30 lines
974 B
YAML

name: Repo Dispatcher
on:
workflow_dispatch:
inputs:
package_clean:
description: 'check to make clean package'
default: 'false'
required: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
device: [r1p, r1s, r1s-h3, r2c, r2s, r4s, x86]
steps:
- name: Trigger Compile
run: |
if [ '${{ matrix.device }}' = 'r1s' ]; then
branch='18.06';
else
branch='master';
fi
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.SEC_TOKEN }}" \
-d '{"event_type": "${{ matrix.device }}", "client_payload": {"branch": "'$branch'", "device": "${{ matrix.device }}", "package_clean": "${{ github.event.inputs.package_clean }}" }}'