Explorar o código

ci: change trigger from scheduled cron to PR labeled events with beta label condition

Dax Raad hai 2 meses
pai
achega
372dcc033c
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      .github/workflows/beta.yml

+ 4 - 3
.github/workflows/beta.yml

@@ -2,14 +2,16 @@ name: beta
 
 on:
   workflow_dispatch:
-  schedule:
-    - cron: "0 * * * *"
+  pull_request:
+    types: [labeled]
 
 jobs:
   sync:
+    if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'beta'
     runs-on: blacksmith-4vcpu-ubuntu-2404
     permissions:
       contents: write
+      pull-requests: write
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
@@ -29,5 +31,4 @@ jobs:
       - name: Sync beta branch
         env:
           GH_TOKEN: ${{ steps.setup-git-committer.outputs.token }}
-          DISCORD_ISSUES_WEBHOOK_URL: ${{ secrets.DISCORD_ISSUES_WEBHOOK_URL }}
         run: bun script/beta.ts