Skip to content

✨ Provide stdout output when dagger execution fails #183

@julianmaze

Description

@julianmaze

What are you trying to do?

I want to utilize the stdout of the dagger call regardless of its exit code. I have pipelines that print data, then fail or succeed based on the contents of that data. I would like to include that data in step summaries and interact with it in subsequent steps and jobs within my GHA workflow.

Why is this important to you?

This is important because I want the stdout output regardless of the dagger exit code.

How are you currently working around this?

I am not able to work around this using this action. I do believe, however, that splitting out the following lines of code into an action step that runs always() should be all that is needed.

{
# we need a delim that doesn't appear in the output - a hash of the
# file itself *probably* won't (if it does, we have larger
# cryptographic problems)
delim="$(sha256sum $tmpout | cut -d " " -f1)"
echo "stdout<<${delim}"
cat "${tmpout}"
echo
echo "${delim}"
} >> "$GITHUB_OUTPUT"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions