forked from kiddin9/Kwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (85 loc) · 4.27 KB
/
repo-dispatcher.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#=================================================
# https://github.com/P3TERX/Actions-OpenWrt
# Description: Build OpenWrt using GitHub Actions
# Lisence: MIT
# Author: P3TERX
# Blog: https://p3terx.com
#=================================================
name: Repo Dispatcher
on:
# push:
# branches:
# - master
#schedule:
# - cron: 30 18 * * *
workflow_dispatch:
inputs:
version:
description: 'Version'
required: false
default: ''
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
TZ: Asia/Shanghai
jobs:
build:
runs-on: Ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
- name: Load Settings.ini
run: |
source "${GITHUB_WORKSPACE}/devices/common/settings.ini"
if [ -f "devices/${{matrix.target}}/settings.ini" ]; then
source "${GITHUB_WORKSPACE}/devices/${{matrix.target}}/settings.ini"
fi
echo "REPO_URL=${REPO_URL}" >> $GITHUB_ENV
echo "REPO_BRANCH=${REPO_BRANCH}" >> $GITHUB_ENV
- name: Trigger Compile
run: |
sudo timedatectl set-timezone "$TZ"
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "x86_64 ${{ github.event.inputs.version }}", "client_payload": {"target": "x86_64"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "rockchip_armv8 ${{ github.event.inputs.version }}", "client_payload": {"target": "rockchip_armv8"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "bcm27xx_bcm2711 ${{ github.event.inputs.version }}", "client_payload": {"target": "bcm27xx_bcm2711"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "armvirt_64 ${{ github.event.inputs.version }}", "client_payload": {"target": "armvirt_64"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "mediatek_mt7622 ${{ github.event.inputs.version }}", "client_payload": {"target": "mediatek_mt7622"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "ramips_mt7621 ${{ github.event.inputs.version }}", "client_payload": {"target": "ramips_mt7621"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "ipq807x ${{ github.event.inputs.version }}", "client_payload": {"target": "ipq807x"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "ipq40xx_generic ${{ github.event.inputs.version }}", "client_payload": {"target": "ipq40xx_generic"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "bcm53xx ${{ github.event.inputs.version }}", "client_payload": {"target": "bcm53xx"}}'