Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Prevent running certain workflows on forks (#3773)
Madison Swain-Bowdene98f7e90f260
diff --git a/.github/workflows/generate_pot.yml b/.github/workflows/generate_pot.ymlindex 0d7b7e3c2..b1af0babe 100644--- a/.github/workflows/generate_pot.yml+++ b/.github/workflows/generate_pot.yml@@ -16,6 +16,8 @@ jobs:generate-pot:name: Generate POT fileruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/.github/workflows/issue_automations.yml b/.github/workflows/issue_automations.ymlindex fd6fefbfc..3e0a66781 100644--- a/.github/workflows/issue_automations.yml+++ b/.github/workflows/issue_automations.yml@@ -18,6 +18,8 @@ jobs:run:name: Perform issue automationsruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/.github/workflows/label_sync.yml b/.github/workflows/label_sync.ymlindex d4d3710fa..fae7b7620 100644--- a/.github/workflows/label_sync.yml+++ b/.github/workflows/label_sync.yml@@ -10,6 +10,8 @@ jobs:sync_labels:name: Sync labelsruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/.github/workflows/pr_automations.yml b/.github/workflows/pr_automations.ymlindex bfc8c0e6c..4e67624fa 100644--- a/.github/workflows/pr_automations.yml+++ b/.github/workflows/pr_automations.yml@@ -33,6 +33,8 @@ jobs:run:name: Perform PR automationsruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/.github/workflows/pr_automations_init.yml b/.github/workflows/pr_automations_init.ymlindex acae02e92..e54540b56 100644--- a/.github/workflows/pr_automations_init.yml+++ b/.github/workflows/pr_automations_init.yml@@ -34,6 +34,8 @@ jobs:run:name: Save event inforuns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Save event inforun: |diff --git a/.github/workflows/pr_ping.yml b/.github/workflows/pr_ping.ymlindex 9bc827f86..b48eecfc5 100644--- a/.github/workflows/pr_ping.yml+++ b/.github/workflows/pr_ping.yml@@ -10,9 +10,12 @@ on:jobs:send_message:name: Send Slack message+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ # Also prevent running this for bot-related PRsif: |github.actor != 'dependabot[bot]' &&- !startsWith(github.event.pull_request.title, '🔄')+ !startsWith(github.event.pull_request.title, '🔄') &&+ github.repository_owner == 'WordPress'runs-on: ubuntu-latestenv:pr_url: ${{ github.event.pull_request.html_url }}diff --git a/.github/workflows/project_thread_update_reminders.yml b/.github/workflows/project_thread_update_reminders.ymlindex 9d3c8319b..293d780bd 100644--- a/.github/workflows/project_thread_update_reminders.yml+++ b/.github/workflows/project_thread_update_reminders.yml@@ -8,6 +8,8 @@ on:jobs:send-reminders:runs-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- uses: actions/checkout@v4- uses: actions/github-script@v6diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex 762b5955f..eea0a3fbd 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -23,6 +23,8 @@ jobs:release-app:name: Release appruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'permissions:# Needed to create the GitHub release on the repocontents: writediff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.ymlindex d10eeda76..88b06b2d1 100644--- a/.github/workflows/renovate.yml+++ b/.github/workflows/renovate.yml@@ -28,7 +28,8 @@ env:jobs:renovate:runs-on: ubuntu-latest- if: github.repository == 'WordPress/openverse'+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- uses: actions/checkout@v4diff --git a/.github/workflows/subscribe_to_label.yml b/.github/workflows/subscribe_to_label.ymlindex 06c5de46e..a2b9b0aca 100644--- a/.github/workflows/subscribe_to_label.yml+++ b/.github/workflows/subscribe_to_label.yml@@ -8,6 +8,8 @@ on:jobs:subscribe:runs-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- uses: bytecodealliance/subscribe-to-label-action@v1with:diff --git a/.github/workflows/sync_meta.yml b/.github/workflows/sync_meta.ymlindex 5ca5d35fb..06d54caa3 100644--- a/.github/workflows/sync_meta.yml+++ b/.github/workflows/sync_meta.yml@@ -16,6 +16,8 @@ jobs:sync_meta:name: Sync meta filesruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/.github/workflows/weekly_updates.yml b/.github/workflows/weekly_updates.ymlindex b39018d7c..6c52d0aee 100644--- a/.github/workflows/weekly_updates.yml+++ b/.github/workflows/weekly_updates.yml@@ -15,6 +15,8 @@ jobs:make_post:name: Create post on Make siteruns-on: ubuntu-latest+ # Prevent running this workflow on forks, it's unnecessary for external contributors+ if: github.repository_owner == 'WordPress'steps:- name: Checkout repositoryuses: actions/checkout@v4