浏览代码

ci(installer): fix token passing and only run on main repo

Marc Cornellà 5 月之前
父节点
当前提交
7a30bcae40
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      .github/workflows/installer.yml

+ 3 - 1
.github/workflows/installer.yml

@@ -17,6 +17,7 @@ permissions:
 jobs:
   test:
     name: Test installer
+    if: github.repository == 'ohmyzsh/ohmyzsh'
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
@@ -48,7 +49,8 @@ jobs:
         env:
           VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
           VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+          VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
         run: |
           cp tools/install.sh .github/workflows/installer/install.sh
           cd .github/workflows/installer
-          vc deploy --prod -t ${{ secrets.VERCEL_TOKEN }}
+          vc deploy --prod -t "$VERCEL_TOKEN"