Kaynağa Gözat

build: only run upload tasks on main repo

Eric Helgeson 1 yıl önce
ebeveyn
işleme
1b8bc5d68f
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      .github/workflows/firmware_build.yml

+ 2 - 2
.github/workflows/firmware_build.yml

@@ -39,7 +39,7 @@ jobs:
       - name: Upload to latest release
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        if: github.ref == 'refs/heads/main'
+        if: ${{ github.ref == 'refs/heads/main' && github.repository == 'BlueSCSI/BlueSCSI-v2' }}
         run: |
           cd BlueSCSI
           git tag -d latest
@@ -52,7 +52,7 @@ jobs:
       - name: Upload to newly created release
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        if: ${{ startsWith(github.ref, 'refs/tags/') }}
+        if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'BlueSCSI/BlueSCSI-v2' }}
         run: |
           cd BlueSCSI/distrib
           RELEASE=$(basename ${{github.ref}})