01 · Before and afterThe pattern
# before: looks scoped to the sub-project, but the action step runs at repo root
defaults: { run: { working-directory: ./service } }
steps:
- uses: org/setup-toolchain@<sha>
- run: make test # this one is in ./service
# after: actions get the directory as an input
- uses: org/setup-toolchain@<sha>
with: { working_directory: ./service }02 · Run it on your appThe check
In your CI, does every action step in a sub-directory job get the directory explicitly, or do you rely on a run default that it ignores?
If the honest answer is no or not sure, this is worth a look before it reaches production.