Skip to content

Validate only changed extensions in CI #117

Validate only changed extensions in CI

Validate only changed extensions in CI #117

Workflow file for this run

name: CI
on:
pull_request:
jobs:
ci:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history to compare with base branch
- run: corepack enable
- uses: actions/setup-node@v4.0.2
with:
node-version: 22
cache: yarn
- run: yarn install --immutable
- name: Detect changed extensions
id: changes
run: |
CHANGED_IDS=$(yarn run --silent get-changed-extensions "origin/${{ github.base_ref }}")
echo "changed_ids<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGED_IDS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
if [ -n "$CHANGED_IDS" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "Changed extensions:"
echo "$CHANGED_IDS"
else
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No extension changes detected"
fi
- name: Validate changed extensions
if: steps.changes.outputs.has_changes == 'true'
run: |
yarn validate --ids "${{ steps.changes.outputs.changed_ids }}"