Ver Fonte

chore(workflows): Avoid running workflows in forked repositories (#31877)

Signed-off-by: Fran Mulero <francisco-jose.mulero@broadcom.com>
Fran Mulero há 7 meses atrás
pai
commit
596adcafc3
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      .github/workflows/index-monitor.yml

+ 2 - 2
.github/workflows/index-monitor.yml

@@ -106,7 +106,7 @@ jobs:
   upload:
     name: Re-upload index.yaml
     needs: [validation-check, integrity-check]
-    if: ${{ always() && (needs.validation-check.outputs.result != 'ok' || needs.integrity-check.outputs.result != 'ok') }}
+    if: ${{ always() && github.repository_owner == 'bitnami' && (needs.validation-check.outputs.result != 'ok' || needs.integrity-check.outputs.result != 'ok') }}
     uses: bitnami/charts/.github/workflows/sync-chart-cloudflare-index.yml@index
     secrets: inherit
     permissions:
@@ -114,7 +114,7 @@ jobs:
   notify:
     name: Send notification
     needs: [validation-check, integrity-check]
-    if: ${{ always() && (needs.validation-check.outputs.result != 'ok' || needs.integrity-check.outputs.result != 'ok') }}
+    if: ${{ always() && github.repository_owner == 'bitnami' && (needs.validation-check.outputs.result != 'ok' || needs.integrity-check.outputs.result != 'ok') }}
     uses: bitnami/support/.github/workflows/gchat-notification.yml@main
     with:
       workflow: ${{ github.workflow }}