diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6df940789c..4556d33476 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,21 +86,21 @@ jobs: - name: Install root dependencies run: pnpm --filter root install - - name: Check for changes in /cli - id: cli-check + - name: Check and Validate Changes in /cli with Debugging run: | + set -x git fetch origin next:next - git diff --name-only next...${{ github.sha }} | grep '^cli/' || echo "No changes in /cli" - - # This will use the `changedFilePatterns` to check that a changeset has been added - # if any matched file has been changed in /cli - - name: Debug CLI Changes Output - run: | - echo "CLI changes output: '${{ steps.cli-check.outputs.stdout }}'" - - - name: Validate changeset if /cli modified - if: steps.cli-check.outputs.stdout != 'No changes in /cli' - run: pnpm changeset status --since origin/next + changes=$(git diff --name-only next...${{ github.sha }} | grep '^cli/') + echo "Debug: Value of 'changes' variable: $changes" + if [[ -n "$changes" ]]; then + echo "Debug: Entering conditional block because 'changes' is non-empty." + echo "Changes detected in /cli: $changes" + pnpm changeset status --since origin/next + else + echo "Debug: Entering else block because 'changes' is empty." + echo "No changes in /cli" + fi + set +x prettier: runs-on: ubuntu-latest