Skip to content

feat: add working-directory input - #34

Merged
dsherret merged 1 commit into
mainfrom
working_directory
Sep 7, 2026
Merged

feat: add working-directory input#34
dsherret merged 1 commit into
mainfrom
working_directory

Conversation

@dsherret

@dsherret dsherret commented Sep 7, 2026

Copy link
Copy Markdown
Member

Adds a working-directory input to run dprint check in a subdirectory, such as a package in a monorepo:

- uses: dprint/check@v2
  with:
    working-directory: packages/app
  • The config-path and args inputs are relative to the working directory, while the annotations and the unformatted-files output stay relative to the workspace since that's what GitHub needs.
  • The cache key's config hash joins the working directory and config path, since hashFiles is relative to the workspace.
  • CI checks tests/working-dir, which has its own config and a formatted file, after the poorly-formatted file is created at the repo root. The check would fail if it didn't run in the directory, and it asserts unformatted-count is 0.

@dsherret
dsherret merged commit 7dc032d into main Sep 7, 2026
14 checks passed
@dsherret
dsherret deleted the working_directory branch September 7, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant