Parcourir la source

ci: use PAT & trigger only if os is windows (#479)

Co-authored-by: Ayyan <ayn2op@gmail.com>
vvxrtues il y a 1 an
Parent
commit
0361434c4c
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      .github/workflows/ci.yml

+ 3 - 3
.github/workflows/ci.yml

@@ -28,12 +28,12 @@ jobs:
             discordo.exe
 
       - name: Send repository dispatch
-        if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
+        if: ${{ runner.os == 'Windows' && github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
         env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          GH_TOKEN: ${{ secrets.PAT }}
         run: |
           gh api \
             --method POST \
             -H "Accept: application/vnd.github+json" \
             /repos/vvirtues/bucket/dispatches \
-            -f "event_type=discordo-ci-completed"
+            -f "event_type=discordo-ci-completed"