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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 14 additions and 6 deletions

View file

@ -32,11 +32,14 @@ jobs:
recognize: recognize:
name: Render and post contributor card name: Render and post contributor card
if: | if: |
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) || github.repository == 'nexu-io/open-design' &&
(github.event_name == 'issues' && github.event.action == 'opened') || (
(github.event_name == 'discussion' && github.event.action == 'created') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) ||
(github.event_name == 'discussion_comment' && github.event.action == 'created') || (github.event_name == 'issues' && github.event.action == 'opened') ||
github.event_name == 'workflow_dispatch' (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 runs-on: ubuntu-latest
timeout-minutes: 8 timeout-minutes: 8

View file

@ -40,7 +40,7 @@ jobs:
notify: notify:
# state_reason "completed" excludes "not planned" closures. # state_reason "completed" excludes "not planned" closures.
# We further require an actual merged-PR linkage in the script below. # 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 runs-on: ubuntu-latest
steps: steps:
- name: Find the merged PR that closed this issue - name: Find the merged PR that closed this issue

View file

@ -35,6 +35,7 @@ concurrency:
jobs: jobs:
deploy: deploy:
name: Deploy landing page name: Deploy landing page
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20

View file

@ -18,6 +18,7 @@ permissions:
jobs: jobs:
metrics: metrics:
name: Generate repository metrics SVG name: Generate repository metrics SVG
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Generate GitHub repository metrics - name: Generate GitHub repository metrics

View file

@ -20,6 +20,7 @@ concurrency:
jobs: jobs:
refresh: refresh:
name: Refresh contributors wall cache bust name: Refresh contributors wall cache bust
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -45,6 +45,7 @@ env:
jobs: jobs:
metadata: metadata:
name: Prepare beta metadata name: Prepare beta metadata
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
OPEN_DESIGN_BETA_METADATA_URL: ${{ vars.CLOUDFLARE_R2_RELEASES_PUBLIC_ORIGIN }}/beta/latest/metadata.json OPEN_DESIGN_BETA_METADATA_URL: ${{ vars.CLOUDFLARE_R2_RELEASES_PUBLIC_ORIGIN }}/beta/latest/metadata.json

View file

@ -36,6 +36,7 @@ env:
jobs: jobs:
metadata: metadata:
name: Prepare release metadata name: Prepare release metadata
if: github.repository == 'nexu-io/open-design'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}