Skip to content

Commit

Permalink
Add separate watched files for IDE Packaging CI workflow (#11940)
Browse files Browse the repository at this point in the history
Changelog:
- add: separate `ide-changed-files.yml` workflow tracking the changes in IDE-related files
  • Loading branch information
4e6 authored Dec 27, 2024
1 parent f84d7d8 commit 9cd355c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/gui-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
.prettierignore
vitest.workspace.ts
.github/workflows/gui*
.github/workflows/ide*
.github/workflows/storybook.yml
files_ignore: |
app/ide-desktop/**
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/ide-changed-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file is not auto-generated. Feel free to edit it.

name: IDE Changed Files

on:
workflow_call:
outputs:
all_changed_files:
description: "Returns all changed files"
value: ${{ jobs.ide-changed-files.outputs.all_changed_files }}
any_changed:
description: "Returns `true` when any of the filenames have changed"
value: ${{ jobs.ide-changed-files.outputs.any_changed }}

jobs:
ide-changed-files:
runs-on: ubuntu-latest
name: Changed Files
outputs:
all_changed_files: ${{ steps.ide-changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.ide-changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: ide-changed-files
uses: tj-actions/changed-files@v45
with:
files: |
app/ide-desktop/**
package.json
pnpm-lock.yaml
.github/workflows/ide*
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.ide-changed-files.outputs.all_changed_files }}
run: |
if [[ "${{ steps.ide-changed-files.outputs.any_changed }}" == "true" ]]; then
echo "Files changed:"
fi
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
9 changes: 7 additions & 2 deletions .github/workflows/ide-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
uses: ./.github/workflows/gui-changed-files.yml
secrets: inherit

ide-changed-files:
name: 🔍 IDE Files Changed
uses: ./.github/workflows/ide-changed-files.yml
secrets: inherit

engine-changed-files:
name: 🔍 Engine Files Changed
uses: ./.github/workflows/engine-changed-files.yml
Expand All @@ -27,14 +32,14 @@ jobs:
name: 📦 Package
uses: ./.github/workflows/ide-packaging.yml
needs: [gui-changed-files, engine-changed-files]
if: needs.gui-changed-files.outputs.any_changed == 'true' || needs.engine-changed-files.outputs.any_changed == 'true' || github.ref == 'refs/heads/develop'
if: needs.gui-changed-files.outputs.any_changed == 'true' || needs.ide-changed-files.outputs.any_changed == 'true' || needs.engine-changed-files.outputs.any_changed == 'true' || github.ref == 'refs/heads/develop'
secrets: inherit

ide-packaging-optional:
name: 📦 Package (Optional)
uses: ./.github/workflows/ide-packaging-optional.yml
needs: [gui-changed-files, engine-changed-files]
if: needs.gui-changed-files.outputs.any_changed == 'true' || needs.engine-changed-files.outputs.any_changed == 'true' || github.ref == 'refs/heads/develop'
if: needs.gui-changed-files.outputs.any_changed == 'true' || needs.ide-changed-files.outputs.any_changed == 'true' || needs.engine-changed-files.outputs.any_changed == 'true' || github.ref == 'refs/heads/develop'
secrets: inherit

required-checks:
Expand Down

0 comments on commit 9cd355c

Please sign in to comment.