Skip to content

Commit 85071f3

Browse files
committed
update to make sure it doesn't build when no relevant changes were made
1 parent c1ce502 commit 85071f3

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

.github/workflows/development.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -222,33 +222,15 @@ jobs:
222222
- name: Check if UI-related files changed
223223
id: check-changes
224224
run: |
225-
# Get the base branch
226225
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
227-
228-
# Get list of changed files
229226
CHANGED_FILES=$(git diff --name-only origin/$BASE_BRANCH...HEAD)
230-
231-
# Define the files we care about in root
232-
ROOT_FILES="package.json package-lock.json jest.config.cjs jest.setup.ts eslint.config.js cypress.config.ts .prettierrc .prettierignore tsconfig.json tsconfig.base.json tsconfig.test.json tsconfig.cypress.json"
233-
234-
# Check if src/ui directory changed or any of the root files changed
235227
SHOULD_BUILD=false
236228
237-
# Check if any file in src/ui changed
238-
if echo "$CHANGED_FILES" | grep -q -E "^(src/ui|tests/ui)/"; then
229+
if echo "$CHANGED_FILES" | grep -q "^src/ui/"; then
239230
echo "UI source files changed"
240231
SHOULD_BUILD=true
241232
fi
242233
243-
# Check if any of the root configuration files changed
244-
for file in $ROOT_FILES; do
245-
if echo "$CHANGED_FILES" | grep -q "^${file}$"; then
246-
echo "Root config file changed: $file"
247-
SHOULD_BUILD=true
248-
break
249-
fi
250-
done
251-
252234
echo "should_build=$SHOULD_BUILD" >> $GITHUB_OUTPUT
253235
echo "Should build: $SHOULD_BUILD"
254236

0 commit comments

Comments
 (0)