Skip to content

Commit

Permalink
chore: Add job summary
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Jan 30, 2025
1 parent af382d1 commit 95cf1c9
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/kurtosis-op-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,28 @@ jobs:
- name: Prepare matrix
id: prepare
run: |
# Just to keep things DRY
ASSETS_PREFIX="./.github/assets/kurtosis_op_network_params_"
# If the filter does not match anything, we want the script to error out
#
# The default behaviour of globs with no matches it to return the expression
# so we'll adjust it to error out if there are no matches
compgen -G "$ASSETS_PREFIX*${{ inputs.filter }}*.yaml" || echo '**No kurtosis args files matching filter `${{ inputs.filter }}`**' >> $GITHUB_STEP_SUMMARY; exit 1
# We use a helper shell script to format a list of matching yaml files into a github-actions-compatible matrix
MATRIX=$(./.github/scripts/kurtosis-format-args-file-matrix.sh "./.github/assets/kurtosis_op_network_params_*${{ inputs.filter }}*.yaml")
MATRIX=$(./.github/scripts/kurtosis-format-args-file-matrix.sh $ASSETS_PREFIX*${{ inputs.filter }}*.yaml)
# And we use the matrix as an output of this step
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
# Finally we make things visible to the user by creating a github job summary markdown
echo '### Kurtosis argument files used' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
# We format the list of matching files as a markdown list
printf -- '- `%s`\n' $ASSETS_PREFIX*${{ inputs.filter }}*.yaml >> $GITHUB_STEP_SUMMARY
test:
name: Kurtosis (${{ matrix.args }})
Expand Down

0 comments on commit 95cf1c9

Please sign in to comment.