12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #=================================================
- # 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"}}'
|