Skip to content

refactor: make CI do less unneeded work #27588

refactor: make CI do less unneeded work

refactor: make CI do less unneeded work #27588

name: Validate PR Description
on:
pull_request:
types:
[
opened,
synchronize,
reopened,
labeled,
unlabeled,
edited,
ready_for_review,
converted_to_draft,
]
permissions:
contents: read
jobs:
detect-changes:
# Don't check the Version Packages PR
if: github.head_ref != 'changeset-release/main'
timeout-minutes: 5
name: Detect Changes
runs-on: ubuntu-slim
outputs:
non_markdown_changed: ${{ steps.changes.outputs.everything_but_markdown }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
everything_but_markdown:
- '!**/*.md'
validate:
name: Validate PR Description
needs: detect-changes
if: needs.detect-changes.outputs.non_markdown_changed == 'true'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-validate
cancel-in-progress: true
timeout-minutes: 30
runs-on: ubuntu-slim
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
pnpm-filters: "tools"
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
- run: node -r esbuild-register tools/deployments/validate-pr-description.ts
env:
TITLE: ${{ github.event.pull_request.title }}
BODY: ${{ github.event.pull_request.body }}
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
FILES: ${{ steps.files.outputs.all }}
DRAFT: ${{ github.event.pull_request.draft }}