Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ steps:
with:
run: go vet ./...
```

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):
```yml
steps:
- name: Code Quality Checks
uses: protocol/multiple-go-modules@master
with:
working-directory: scripts
run: go vet ./...
```
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ inputs:
run:
description: "Command(s) to run"
required: true
working-directory:
description: "working directory"
required: false

runs:
using: "composite"
steps:
- shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
status=0
dirs=$(find . \( -name vendor -o -name '[._].*' -o -name node_modules \) -prune -o -name go.mod -print | sed 's:/go.mod$::')
Expand Down