ci: skip upstream-only workflows on forks (#1586)

This commit is contained in:
lakatos
2026-05-14 14:27:23 +08:00
committed by GitHub
parent 8101e430cf
commit 51d1c4e287
7 changed files with 14 additions and 6 deletions
+8 -5
View File
@@ -32,11 +32,14 @@ jobs:
recognize:
name: Render and post contributor card
if: |
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) ||
(github.event_name == 'issues' && github.event.action == 'opened') ||
(github.event_name == 'discussion' && github.event.action == 'created') ||
(github.event_name == 'discussion_comment' && github.event.action == 'created') ||
github.event_name == 'workflow_dispatch'
github.repository == 'nexu-io/open-design' &&
(
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) ||
(github.event_name == 'issues' && github.event.action == 'opened') ||
(github.event_name == 'discussion' && github.event.action == 'created') ||
(github.event_name == 'discussion_comment' && github.event.action == 'created') ||
github.event_name == 'workflow_dispatch'
)
runs-on: ubuntu-latest
timeout-minutes: 8
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
notify:
# state_reason "completed" excludes "not planned" closures.
# We further require an actual merged-PR linkage in the script below.
if: github.event.issue.state_reason == 'completed'
if: github.repository == 'nexu-io/open-design' && github.event.issue.state_reason == 'completed'
runs-on: ubuntu-latest
steps:
- name: Find the merged PR that closed this issue
@@ -35,6 +35,7 @@ concurrency:
jobs:
deploy:
name: Deploy landing page
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest
timeout-minutes: 20
+1
View File
@@ -18,6 +18,7 @@ permissions:
jobs:
metrics:
name: Generate repository metrics SVG
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest
steps:
- name: Generate GitHub repository metrics
@@ -20,6 +20,7 @@ concurrency:
jobs:
refresh:
name: Refresh contributors wall cache bust
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest
steps:
+1
View File
@@ -45,6 +45,7 @@ env:
jobs:
metadata:
name: Prepare beta metadata
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest
env:
OPEN_DESIGN_BETA_METADATA_URL: ${{ vars.CLOUDFLARE_R2_RELEASES_PUBLIC_ORIGIN }}/beta/latest/metadata.json
+1
View File
@@ -36,6 +36,7 @@ env:
jobs:
metadata:
name: Prepare release metadata
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}