Skip to content

Commit 17785d5

Browse files
make the working directory configurable (#6)
Fixes #4. Example run (with the line-counting fix (#5) applied): https://github.com/marten-seemann-test/target/actions/runs/1071003167
1 parent 7254415 commit 17785d5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ steps:
2525
with:
2626
run: go vet ./...
2727
```
28+
29+
Optionally, the working directory can be specified, analagously to the [`working-directory` option on `run`](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun):
30+
```yml
31+
steps:
32+
- name: Code Quality Checks
33+
uses: protocol/multiple-go-modules@master
34+
with:
35+
working-directory: scripts
36+
run: go vet ./...
37+
```

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ inputs:
55
run:
66
description: "Command(s) to run"
77
required: true
8+
working-directory:
9+
description: "working directory"
10+
required: false
811

912
runs:
1013
using: "composite"
1114
steps:
1215
- shell: bash
16+
working-directory: ${{ inputs.working-directory }}
1317
run: |
1418
status=0
1519
dirs=$(find . \( -name vendor -o -name '[._].*' -o -name node_modules \) -prune -o -name go.mod -print | sed 's:/go.mod$::')

0 commit comments

Comments
 (0)