Add working-directory input for monorepo support#371
Open
guillaume-sainthillier wants to merge 2 commits intolaminas:1.33.xfrom
Open
Add working-directory input for monorepo support#371guillaume-sainthillier wants to merge 2 commits intolaminas:1.33.xfrom
guillaume-sainthillier wants to merge 2 commits intolaminas:1.33.xfrom
Conversation
294efb8 to
e0c00d2
Compare
This adds a new `working-directory` input that allows users to specify a subdirectory where the action should look for composer.json and other configuration files. This is useful for monorepo setups where packages are located in subdirectories. When a working directory is specified: - The action changes to that directory before running - Git diff uses --relative to automatically filter and relativize paths Signed-off-by: Guillaume Sainthillier <guillaume.sainthillier@gmail.com>
621495b to
abfc27a
Compare
- Add monorepo support section to README with usage example - Add shell test script verifying git diff --relative behavior - Add shell-testing job to CI workflow https://claude.ai/code/session_01DHWfTeAZF4BbLrQRzdbRKX Signed-off-by: Claude <noreply@anthropic.com>
abfc27a to
56ed56e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for monorepo configurations by introducing a
working-directoryinput parameter that allows the action to operate within a specific subdirectory of the repository.Key Changes
New Input Parameter: Added
working-directoryinput toaction.ymlwith a default value of.(current directory)composer.jsonand other configuration files are locatedDiff Filtering Logic: Implemented filtering in
entrypoint.shto:Directory Navigation: Added logic to change into the working directory before executing the main action script
Implementation Details
WORKING_DIRvariable defaults to.ifINPUT_WORKING_DIRECTORYis not set, preserving existing behavior