Determine Execution Path is a GitHub Action that analyzes your repository to decide which top-level services or infrastructure-as-code (IaC) components should be executed, based on the files modified in a pull request or commit. It takes as input a list of modified files and a summary of services used, then outputs a structured object indicating which areas (IaC, Lambda, Glue, State Machine, Lambda Layer) require execution.
Use this action in CI workflows to automate conditional deployments, optimize build steps, or enforce compliance based on code changes.
- Detects changes in top-level directories:
cfn
,tf
,sls
,sam
,lambda
,glue
,state-machine
,lambda-layer
- Determines if infrastructure (IaC) or specific AWS services need to be executed
- Outputs a structured JSON object (
execution-path
) with boolean flags for each service/component - Appends a markdown summary table to the GitHub Actions summary
Name | Description |
---|---|
execution-path |
JSON object showing which top-level services/areas need execution |
{
"IaC": true,
"lambda": false,
"glue": true,
"state-machine": false,
"lambda-layer": true
}
name: Determine Execution Path
on:
push:
branches: [main]
jobs:
determine-execution-path:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Determine Execution Path
id: execpath
uses: subhamay-bhattacharyya-gha/exec-path-action@main
with:
files-modified: path/to/repo-changes.json
services-used: path/to/services-used.json
- name: Print Execution Path
run: echo "Execution Path: ${{ steps.execpath.outputs.execution-path }}"
To test or develop this action locally:
- Clone the repo
- Run
node main.js
from the project root - Ensure the expected folders (
lambda/src
,glue/script
, etc.) exist for testing - Review the console output for service detection results
You can also test it inside a GitHub workflow by referencing the action locally:
- name: Test Local Action
uses: ./ # Use local path for testing
We welcome contributions! You can help by:
- Reporting bugs
- Suggesting features
- Writing docs
- Submitting PRs
Check out the CONTRIBUTING.md guide to get started. Please also read our Code of Conduct.
See CHANGELOG.md for release notes.
Latest versions:
v1.0.1
: Added pre-commit hooksv1.0.0
: Initial release
This project is licensed under the MIT License. See LICENSE for details.