Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add separate watched files for IDE Packaging CI workflow #11940

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/**
Copy link
Contributor Author

@4e6 4e6 Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because gui-changed-files.yml ignores the ide-desktop directory, this PR introduces a separate ide-changed-files.yml that watches Electron-related files and triggers the IDE Packaging workflow.

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/ide-changed-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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: |

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
Loading