From 64bc7dbf6ef64a50325d964317ab22a79653f762 Mon Sep 17 00:00:00 2001 From: Michael Clark <5285928+MikesGlitch@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:20:36 +0000 Subject: [PATCH] :robot: Adding path filters so workflows only run when required (#6364) * adding path filters to workflows so they only run when required * trigger them also when the workflow changes * adding yarn lock in case packages affect e2e * release notes * add the package.json in case we modify the scripts * Remove API changes from size comparison workflow * Clarify size impact of package changes in workflow Updated comments to clarify that certain package changes don't affect the size of the web/api. * Fix comments for VRT update exclusions * Update VRT screenshots Auto-generated by VRT workflow PR: #6364 * Update VRT screenshots Auto-generated by VRT workflow PR: #6364 * Fix comment formatting in VRT update workflow --------- Co-authored-by: github-actions[bot] --- .github/workflows/e2e-test.yml | 10 ++++++++++ .github/workflows/electron-pr.yml | 9 +++++++++ .github/workflows/size-compare.yml | 20 +++++++++++++------- .github/workflows/vrt-update-generate.yml | 11 +++++++++-- upcoming-release-notes/6364.md | 7 +++++++ 5 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 upcoming-release-notes/6364.md diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 637d135bde..a013c9c928 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -2,6 +2,16 @@ name: E2E Tests on: pull_request: + paths: + - "packages/**" + - "package.json" + - "yarn.lock" + - ".github/workflows/e2e-test.yml" + - "!packages/sync-server/**" # Sync server changes don't affect E2E tests + - "!packages/api/**" # API changes don't affect E2E tests + - "!packages/ci-actions/**" # CI actions changes don't affect E2E tests + - "!packages/docs/**" # Docs changes don't affect E2E tests + - "!packages/eslint-plugin-actual/**" # Eslint plugin changes don't affect E2E tests env: GITHUB_PR_NUMBER: ${{github.event.pull_request.number}} diff --git a/.github/workflows/electron-pr.yml b/.github/workflows/electron-pr.yml index 84a62625a4..b9b24d9345 100644 --- a/.github/workflows/electron-pr.yml +++ b/.github/workflows/electron-pr.yml @@ -9,6 +9,15 @@ env: on: pull_request: + paths: + - "packages/**" + - "package.json" + - "yarn.lock" + - ".github/workflows/electron-pr.yml" + - "!packages/api/**" # API changes don't affect Electron + - "!packages/ci-actions/**" # CI actions changes don't affect Electron + - "!packages/docs/**" # Docs changes don't affect Electron + - "!packages/eslint-plugin-actual/**" # Eslint plugin changes don't affect Electron concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} diff --git a/.github/workflows/size-compare.yml b/.github/workflows/size-compare.yml index 89e025b795..b0cde644bb 100644 --- a/.github/workflows/size-compare.yml +++ b/.github/workflows/size-compare.yml @@ -14,8 +14,14 @@ name: Compare Sizes on: pull_request_target: paths: - - 'packages/**' - - '!packages/sync-server/**' + - "packages/**" + - "package.json" + - "yarn.lock" + - ".github/workflows/size-compare.yml" + - "!packages/sync-server/**" # Sync server changes don't affect the size of the web/api + - "!packages/ci-actions/**" # CI actions changes don't affect the size of the web/api + - "!packages/docs/**" # Docs changes don't affect the size of the web/api + - "!packages/eslint-plugin-actual/**" # Eslint plugin changes don't affect the size of the web/api concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -35,7 +41,7 @@ jobs: - name: Set up environment uses: ./.github/actions/setup with: - download-translations: 'false' + download-translations: "false" - name: Wait for ${{github.base_ref}} web build to succeed uses: fountainhead/action-wait-for-check@5a908a24814494009c4bb27c242ea38c93c593be # v1.2.0 @@ -79,7 +85,7 @@ jobs: with: branch: ${{github.base_ref}} workflow: build.yml - workflow_conclusion: '' # ignore the conclusion of the workflow, since we already checked it + workflow_conclusion: "" # ignore the conclusion of the workflow, since we already checked it name: build-stats path: base - name: Download API build artifact from ${{github.base_ref}} @@ -88,7 +94,7 @@ jobs: with: branch: ${{github.base_ref}} workflow: build.yml - workflow_conclusion: '' # ignore the conclusion of the workflow, since we already checked it + workflow_conclusion: "" # ignore the conclusion of the workflow, since we already checked it name: api-build-stats path: base - name: Download build stats from PR @@ -96,7 +102,7 @@ jobs: with: pr: ${{github.event.pull_request.number}} workflow: build.yml - workflow_conclusion: '' # ignore the conclusion of the workflow, since we already checked it + workflow_conclusion: "" # ignore the conclusion of the workflow, since we already checked it name: build-stats path: head allow_forks: true @@ -105,7 +111,7 @@ jobs: with: pr: ${{github.event.pull_request.number}} workflow: build.yml - workflow_conclusion: '' # ignore the conclusion of the workflow, since we already checked it + workflow_conclusion: "" # ignore the conclusion of the workflow, since we already checked it name: api-build-stats path: head allow_forks: true diff --git a/.github/workflows/vrt-update-generate.yml b/.github/workflows/vrt-update-generate.yml index c050a1a3bd..c9f270e575 100644 --- a/.github/workflows/vrt-update-generate.yml +++ b/.github/workflows/vrt-update-generate.yml @@ -5,8 +5,15 @@ on: pull_request: types: [opened, synchronize, reopened] paths: - - 'packages/**' - - '.github/workflows/vrt-update-generate.yml' + - "packages/**" + - "package.json" + - "yarn.lock" + - ".github/workflows/vrt-update-generate.yml" + - "!packages/sync-server/**" # Sync server changes don't affect the VRT + - "!packages/api/**" # API changes don't affect the VRT + - "!packages/ci-actions/**" # CI actions changes don't affect the VRT + - "!packages/docs/**" # Docs changes don't affect the VRT + - "!packages/eslint-plugin-actual/**" # Eslint plugin changes don't affect the VRT permissions: contents: read diff --git a/upcoming-release-notes/6364.md b/upcoming-release-notes/6364.md new file mode 100644 index 0000000000..a0bbaf1c6d --- /dev/null +++ b/upcoming-release-notes/6364.md @@ -0,0 +1,7 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Preventing Github UI Workflows when unrelated files change +