{"repo":"hellofresh/action-changed-files","free":true,"listed":false,"github":"https://github.com/hellofresh/action-changed-files","clone":"git clone https://github.com/hellofresh/action-changed-files.git","description":"GitHub Action for matrix generation based on changed files matched against regular expressions","language":"Python","stars":38,"topics":["github-actions","open-source","wiz-reliability-platform-cloud-runtime"],"license":"Apache-2.0","category":"workflow-automation","readme_excerpt":"action-changed-files Generate a GitHub Actions job matrix based on changed files (with an extra twist). Problem statement Repositories are often composed of multiple modules or directories that are built & deployed differently. They can represent a part of the system, or a specific environment. Modules like this also often share some common files. The (traditional) and easiest way to guarantee that all changes are properly tested in CI is to run all jobs for every single change, but this can lead to a very long verification time. Ideally, you want to be able to trigger (and skip) jobs based on the contents (and type) of a change. Trigger paths and matrix job strategy are two great features that can help reducing verification time, but they're still not flexible enough. Example Sample repository neo helps with generating a job matrix based on the changed files in a pull-request, or after merging it to the target branch. Consider the following repository directory structure: and that we want to: verify & deploy changes to infrastructure as code affecting the live and staging environments build & test changes to library/parser and library/network Sample workflow Let's break down what will happen here with a few examples: Changed files Behaviour infrastructure/live/main.tf infrastructure/staging/main.tf jobs.deploy[live] jobs.deploy[staging] library/parser/json.c library/network/tcp.c jobs.build[parser] jobs.build[network] terraform-modules/aws.tf library/common/printer.c jobs.de","default_branch":null,"files":null,"tree":[],"storefront":"/r/hellofresh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hellofresh/action-changed-files/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}