dispatch.yaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. name: Dispatch
  2. run-name: Dispatched Repository Actions - ${{ inputs.job }} ⌛️
  3. on:
  4. workflow_dispatch:
  5. inputs:
  6. job:
  7. description: Dispatch job to run
  8. required: true
  9. type: choice
  10. options:
  11. - steam
  12. - services
  13. - translations
  14. - documentation
  15. - patches
  16. ref:
  17. description: GitHub reference to use for job
  18. type: string
  19. required: false
  20. customAssetWindows:
  21. description: Custom Windows build for Steam Upload
  22. type: string
  23. required: false
  24. customAssetMacOSApple:
  25. description: Custom macOS Apple Silicon build for Steam Upload
  26. type: string
  27. required: false
  28. customAssetMacOSIntel:
  29. description: Custom macOS Intel build for Steam Upload
  30. type: string
  31. required: false
  32. channel:
  33. description: Channel to use when generating Windows update files
  34. type: string
  35. required: false
  36. permissions:
  37. contents: write
  38. jobs:
  39. services-validation:
  40. name: Validate Services 🕵️
  41. if: github.repository_owner == 'obsproject' && inputs.job == 'services'
  42. runs-on: macos-15
  43. permissions:
  44. checks: write
  45. contents: write
  46. pull-requests: write
  47. steps:
  48. - uses: actions/checkout@v4
  49. - name: Check for Defunct Services 📉
  50. uses: ./.github/actions/services-validator
  51. with:
  52. repositorySecret: ${{ secrets.GITHUB_TOKEN }}
  53. checkApiSecret: ${{ secrets.CHECK_SERVERS_API_KEY }}
  54. checkApiServers: ${{ secrets.CHECK_SERVERS_LIST }}
  55. runSchemaChecks: true
  56. runServiceChecks: true
  57. createPullRequest: true
  58. download-language-files:
  59. name: Download Language Files 🌐
  60. if: github.repository_owner == 'obsproject' && inputs.job == 'translations'
  61. runs-on: ubuntu-24.04
  62. env:
  63. CROWDIN_PAT: ${{ secrets.CROWDIN_SYNC_CROWDIN_PAT }}
  64. steps:
  65. - uses: actions/checkout@v4
  66. with:
  67. submodules: recursive
  68. token: ${{ secrets.CROWDIN_SYNC_GITHUB_PAT }}
  69. fetch-depth: 0
  70. - uses: obsproject/obs-crowdin-sync/download@430665179ed13233af2d83ec192c2ae8c40a29ae
  71. steam-upload:
  72. name: Upload Steam Builds 🚂
  73. if: github.repository_owner == 'obsproject' && inputs.job == 'steam'
  74. runs-on: macos-15
  75. steps:
  76. - uses: actions/checkout@v4
  77. - uses: ./.github/actions/steam-upload
  78. with:
  79. steamSecret: ${{ secrets.STEAM_SHARED_SECRET }}
  80. steamUser: ${{ secrets.STEAM_USER }}
  81. steamPassword: ${{ secrets.STEAM_PASSWORD }}
  82. tagName: ${{ inputs.ref }}
  83. customAssetWindows: ${{ inputs.customAssetWindows }}
  84. customAssetMacOSApple: ${{ inputs.customAssetMacOSApple }}
  85. customAssetMacOSIntel: ${{ inputs.customAssetMacOSIntel }}
  86. workflowSecret: ${{ github.token }}
  87. preview: false
  88. update-documentation:
  89. name: Update Documentation 📖
  90. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  91. runs-on: ubuntu-24.04
  92. steps:
  93. - uses: actions/checkout@v4
  94. - uses: ./.github/actions/generate-docs
  95. update-documentation-cloudflare:
  96. name: Update Documentation for Cloudflare ☁️
  97. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  98. runs-on: ubuntu-24.04
  99. steps:
  100. - uses: actions/checkout@v4
  101. - uses: ./.github/actions/generate-docs
  102. with:
  103. disableLinkExtensions: true
  104. deploy-documentation:
  105. name: Deploy Documentation to Cloudflare ☁️
  106. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  107. runs-on: ubuntu-24.04
  108. needs: update-documentation-cloudflare
  109. defaults:
  110. run:
  111. shell: bash
  112. environment:
  113. name: cf-pages-deploy
  114. steps:
  115. - name: Get Commit Information 🆔
  116. id: setup
  117. run: |
  118. : Get Commit Hash 🆔
  119. echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
  120. - uses: actions/download-artifact@v4
  121. with:
  122. name: OBS Studio Docs (No Extensions) ${{ steps.setup.outputs.commitHash }}
  123. path: docs
  124. - name: Publish to Live Page
  125. uses: cloudflare/wrangler-action@4c10c1822abba527d820b29e6333e7f5dac2cabd
  126. with:
  127. workingDirectory: docs
  128. apiToken: ${{ secrets.CF_API_TOKEN }}
  129. accountId: ${{ secrets.CF_ACCOUNT_ID }}
  130. command: pages publish . --project-name=${{ vars.CF_PAGES_PROJECT }} --commit-hash='${{ steps.setup.outputs.commitHash }}'
  131. windows-patches:
  132. name: Create Windows Patches 🩹
  133. if: github.repository_owner == 'obsproject' && inputs.job == 'patches'
  134. runs-on: windows-2022
  135. steps:
  136. - uses: actions/checkout@v4
  137. - uses: ./.github/actions/windows-patches
  138. with:
  139. tagName: ${{ inputs.ref }}
  140. workflowSecret: ${{ github.token }}
  141. channel: ${{ inputs.channel }}
  142. gcsAccessKeyId: ${{ secrets.GCS_ACCESS_KEY_ID }}
  143. gcsAccessKeySecret: ${{ secrets.GCS_ACCESS_KEY_SECRET }}