Browse Source

feat(ci): Adjust mapping of workflow changes to executing them (#35472)

Up until now, almost any Github workflow changes would make all backend and acceptance jobs to execute.

With this change, changes to a specific workflow will *only* make that workflow execute rather than most of them.

This reduces CI usage and reduces the chance of some non-related workflow failing and requiring a re-run.
Armen Zambrano G 2 years ago
parent
commit
407050a8e2
1 changed files with 6 additions and 1 deletions
  1. 6 1
      .github/file-filters.yml

+ 6 - 1
.github/file-filters.yml

@@ -42,8 +42,10 @@ backend_dependencies: &backend_dependencies
   - 'requirements-*.txt'
 
 backend_build_changes: &backend_build_changes
+  # If you change this line make sure that workflows using this action (e.g. acceptance, api_docs)
+  # *and* file-filters would be updated as well
   - '.github/actions/setup-sentry/action.yml'
-  - '.github/workflows/!(frontend)'
+  - '.github/workflows/backend.yml'
   - '.pre-commit-config.yaml'
   - 'Makefile'
   - 'pyproject.toml'
@@ -62,6 +64,9 @@ backend: &backend
 acceptance: &acceptance
   - *backend
   - *frontend
+  # This is verbose because backend_build_changes includes it, however,
+  - '.github/actions/setup-sentry/action.yml'
+  - '.github/workflows/acceptance.yml'
 
 plugins: &plugins
   - *backend