Explorar o código

CI: Do not upload fork artifacts (#657)

Maksim %!s(int64=4) %!d(string=hai) anos
pai
achega
274e9e8576
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      .github/workflows/build.yml

+ 11 - 0
.github/workflows/build.yml

@@ -74,6 +74,7 @@ jobs:
             done
             done
 
 
       - name: 'Generate full hex file'
       - name: 'Generate full hex file'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         uses: ./.github/actions/docker
         uses: ./.github/actions/docker
         with:
         with:
           run: |
           run: |
@@ -86,6 +87,7 @@ jobs:
             done
             done
 
 
       - name: 'Move upload files'
       - name: 'Move upload files'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         uses: ./.github/actions/docker
         uses: ./.github/actions/docker
         with:
         with:
           run: |
           run: |
@@ -106,6 +108,7 @@ jobs:
             done
             done
 
 
       - name: 'Generate full dfu file'
       - name: 'Generate full dfu file'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         uses: ./.github/actions/docker
         uses: ./.github/actions/docker
         with:
         with:
           run: |
           run: |
@@ -118,6 +121,7 @@ jobs:
             done
             done
 
 
       - name: 'Full flash asssembly: bootloader as base'
       - name: 'Full flash asssembly: bootloader as base'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           for TARGET in ${TARGETS}
           for TARGET in ${TARGETS}
           do
           do
@@ -127,6 +131,7 @@ jobs:
           done
           done
 
 
       - name: 'Full flash asssembly: bootloader padding'
       - name: 'Full flash asssembly: bootloader padding'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           for TARGET in ${TARGETS}
           for TARGET in ${TARGETS}
           do
           do
@@ -134,6 +139,7 @@ jobs:
           done
           done
 
 
       - name: 'Full flash asssembly: append firmware'
       - name: 'Full flash asssembly: append firmware'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           for TARGET in ${TARGETS}
           for TARGET in ${TARGETS}
           do
           do
@@ -143,6 +149,7 @@ jobs:
           done
           done
 
 
       - name: 'Bundle core2 firmware'
       - name: 'Bundle core2 firmware'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           test -d core2_firmware && rm -rf core2_firmware || true
           test -d core2_firmware && rm -rf core2_firmware || true
           mkdir core2_firmware
           mkdir core2_firmware
@@ -155,14 +162,17 @@ jobs:
           tar czpf artifacts/flipper-z-any-core2_firmware-${SUFFIX}.tgz core2_firmware
           tar czpf artifacts/flipper-z-any-core2_firmware-${SUFFIX}.tgz core2_firmware
 
 
       - name: 'Bundle scripts'
       - name: 'Bundle scripts'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           tar czpf artifacts/flipper-z-any-scripts-${SUFFIX}.tgz scripts
           tar czpf artifacts/flipper-z-any-scripts-${SUFFIX}.tgz scripts
 
 
       - name: 'Bundle resources'
       - name: 'Bundle resources'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         run: |
         run: |
           tar czpf artifacts/flipper-z-any-resources-${SUFFIX}.tgz -C assets resources
           tar czpf artifacts/flipper-z-any-resources-${SUFFIX}.tgz -C assets resources
 
 
       - name: 'Upload artifacts to update server'
       - name: 'Upload artifacts to update server'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         uses: burnett01/rsync-deployments@4.1
         uses: burnett01/rsync-deployments@4.1
         with:
         with:
           switches: -avzP --delete
           switches: -avzP --delete
@@ -174,6 +184,7 @@ jobs:
           remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }}
           remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }}
 
 
       - name: 'Trigger update server reindex'
       - name: 'Trigger update server reindex'
+        if: ${{ !github.event.pull_request.head.repo.fork }}
         uses: wei/curl@master
         uses: wei/curl@master
         with:
         with:
           args: -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
           args: -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}