Skip to content

Commit

Permalink
only use a group when we're in a multi-module repo
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jul 23, 2021
1 parent d5c1f3f commit 6834c83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ runs:
- shell: bash
run: |
status=0
for dir in $(find . \( -name vendor -o -name '[._].*' -o -name node_modules \) -prune -o -name go.mod -print | sed 's:/go.mod$::'); do
dirs=$(find . \( -name vendor -o -name '[._].*' -o -name node_modules \) -prune -o -name go.mod -print | sed 's:/go.mod$::')
len=${#dirs[@]}
for dir in $dirs; do
pushd $dir > /dev/null
echo "::group::$dir"
if [[ $len > 1 ]]; then echo "::group::$dir"; fi
(
${{ inputs.run }}
)
echo "::endgroup::"
if [[ $len > 1 ]]; then echo "::endgroup::"; fi
s=$?
if [[ $s != 0 ]]; then status=$s; fi
popd > /dev/null
Expand Down

0 comments on commit 6834c83

Please sign in to comment.