Skip to content

Commit

Permalink
Merge pull request #3 from protocol/smart-grouping
Browse files Browse the repository at this point in the history
only use a group when we're in a multi-module repo
  • Loading branch information
marten-seemann authored Jul 23, 2021
2 parents d5c1f3f + 6834c83 commit 7254415
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 7254415

Please sign in to comment.