Explorar o código

ci(workflows): add consistent repository_owner guards

Add missing owner checks to prevent forks from running scheduled
and publish jobs unnecessarily.
Frédéric Guillot hai 1 semana
pai
achega
07a9685ae5

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

@@ -13,7 +13,7 @@ on:
       - 'packaging/debian/**' # Only run on changes to the debian packaging files
 jobs:
   test-packages:
-    if: (github.event_name == 'schedule' && github.repository_owner == 'miniflux' )
+    if: (github.event_name == 'schedule' && github.repository_owner == 'miniflux')
       || github.event_name == 'pull_request'
     name: Test Packages
     runs-on: ubuntu-latest
@@ -61,7 +61,7 @@ jobs:
         if-no-files-found: error
         retention-days: 3
   publish-packages:
-    if: github.event_name == 'push'
+    if: github.event_name == 'push' && github.repository_owner == 'miniflux'
     name: Publish Packages
     runs-on: ubuntu-latest
     steps:

+ 3 - 2
.github/workflows/rpm_packages.yml

@@ -14,7 +14,8 @@ on:
       - '.github/workflows/rpm_packages.yml'
 jobs:
   test-package:
-    if: github.event_name == 'schedule' || github.event_name == 'pull_request'
+    if: (github.event_name == 'schedule' && github.repository_owner == 'miniflux')
+      || github.event_name == 'pull_request'
     name: Test Packages
     runs-on: ubuntu-latest
     steps:
@@ -43,7 +44,7 @@ jobs:
         if-no-files-found: error
         retention-days: 3
   publish-package:
-    if: github.event_name == 'push'
+    if: github.event_name == 'push' && github.repository_owner == 'miniflux'
     name: Publish Packages
     runs-on: ubuntu-latest
     steps: