mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-01 05:00:21 +11:00
feat: add step summary in code block
Signed-off-by: Jeremy Adams <jeremy@dagger.io>
This commit is contained in:
parent
33170d0344
commit
5e78c1aef2
1 changed files with 13 additions and 0 deletions
13
action.yml
13
action.yml
|
|
@ -75,6 +75,8 @@ runs:
|
|||
INPUT_MODULE: ${{ inputs.module }}
|
||||
run: |
|
||||
tmpout=$(mktemp)
|
||||
# Run the command and capture its output in `tmpout`
|
||||
# while also displaying it in the logs
|
||||
cd ${{ inputs.workdir }} && { \
|
||||
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
||||
dagger \
|
||||
|
|
@ -83,8 +85,19 @@ runs:
|
|||
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
||||
${{ inputs.args }}; } | tee "${tmpout}"
|
||||
|
||||
# Send the output to GITHUB_OUTPUT for further processing if needed
|
||||
(echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Append formatted output to GITHUB_STEP_SUMMARY
|
||||
{
|
||||
echo "### Dagger Output"
|
||||
echo ""
|
||||
echo "<pre><code>"
|
||||
cat "${tmpout}"
|
||||
echo "</code></pre>"
|
||||
echo ""
|
||||
} >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- if: inputs.engine-stop == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue