repo-dispatcher.yml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #=================================================
  2. # https://github.com/P3TERX/Actions-OpenWrt
  3. # Description: Build OpenWrt using GitHub Actions
  4. # Lisence: MIT
  5. # Author: P3TERX
  6. # Blog: https://p3terx.com
  7. #=================================================
  8. name: Repo Dispatcher
  9. on:
  10. # push:
  11. # branches:
  12. # - master
  13. #schedule:
  14. # - cron: 30 18 * * *
  15. workflow_dispatch:
  16. inputs:
  17. version:
  18. description: 'Version'
  19. required: false
  20. default: ''
  21. env:
  22. REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
  23. TZ: Asia/Shanghai
  24. jobs:
  25. build:
  26. runs-on: Ubuntu-20.04
  27. steps:
  28. - name: Checkout
  29. uses: actions/checkout@main
  30. - name: Load Settings.ini
  31. run: |
  32. source "${GITHUB_WORKSPACE}/devices/common/settings.ini"
  33. if [ -f "devices/${{matrix.target}}/settings.ini" ]; then
  34. source "${GITHUB_WORKSPACE}/devices/${{matrix.target}}/settings.ini"
  35. fi
  36. echo "REPO_URL=${REPO_URL}" >> $GITHUB_ENV
  37. echo "REPO_BRANCH=${REPO_BRANCH}" >> $GITHUB_ENV
  38. - name: Trigger Compile
  39. run: |
  40. sudo timedatectl set-timezone "$TZ"
  41. curl \
  42. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  43. -H "Accept: application/vnd.github.everest-preview+json" \
  44. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  45. -d '{"event_type": "x86_64 ${{ github.event.inputs.version }}", "client_payload": {"target": "x86_64"}}'
  46. curl \
  47. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  48. -H "Accept: application/vnd.github.everest-preview+json" \
  49. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  50. -d '{"event_type": "rockchip_armv8 ${{ github.event.inputs.version }}", "client_payload": {"target": "rockchip_armv8"}}'
  51. curl \
  52. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  53. -H "Accept: application/vnd.github.everest-preview+json" \
  54. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  55. -d '{"event_type": "bcm27xx_bcm2711 ${{ github.event.inputs.version }}", "client_payload": {"target": "bcm27xx_bcm2711"}}'
  56. curl \
  57. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  58. -H "Accept: application/vnd.github.everest-preview+json" \
  59. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  60. -d '{"event_type": "armvirt_64 ${{ github.event.inputs.version }}", "client_payload": {"target": "armvirt_64"}}'
  61. curl \
  62. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  63. -H "Accept: application/vnd.github.everest-preview+json" \
  64. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  65. -d '{"event_type": "mediatek_mt7622 ${{ github.event.inputs.version }}", "client_payload": {"target": "mediatek_mt7622"}}'
  66. curl \
  67. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  68. -H "Accept: application/vnd.github.everest-preview+json" \
  69. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  70. -d '{"event_type": "ramips_mt7621 ${{ github.event.inputs.version }}", "client_payload": {"target": "ramips_mt7621"}}'
  71. curl \
  72. -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
  73. -H "Accept: application/vnd.github.everest-preview+json" \
  74. -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
  75. -d '{"event_type": "ipq807x ${{ github.event.inputs.version }}", "client_payload": {"target": "ipq807x"}}'