- CI/CD disabled by default in forks to conserve resources - Users can enable via ENABLE_CI_IN_FORK repository variable - Added comprehensive Fork Guide documentation - Updated README with Contributing section - Created automation script for future implementations Benefits: - Saves GitHub Actions minutes across 1,600+ forks - Cleaner fork experience for contributors - Full control for fork owners - PR validation still runs automatically BREAKING CHANGE: CI/CD no longer runs automatically in forks. Fork owners must set ENABLE_CI_IN_FORK=true to enable workflows. Co-authored-by: Brian <bmadcode@gmail.com> Co-authored-by: PinkyD <paulbeanjr@gmail.com>
45 lines
932 B
YAML
45 lines
932 B
YAML
name: format-check
|
|
|
|
"on":
|
|
pull_request:
|
|
branches: ["**"]
|
|
|
|
jobs:
|
|
prettier:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.repository.fork != true || vars.ENABLE_CI_IN_FORK == 'true'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Prettier format check
|
|
run: npm run format:check
|
|
|
|
eslint:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.repository.fork != true || vars.ENABLE_CI_IN_FORK == 'true'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: ESLint
|
|
run: npm run lint
|