Skip to content

Differentiate between input parameter empty or not present #924

Open
@rsenden

Description

Current behavior:

  • If an input parameter is defined in action.yml (without default value), GitHub will set the INPUT_PARAMNAME environment variable to an empty value if the parameter is not present in the workflow

Expected behavior:

  • If an input parameter is defined in action.yml (without default value), GitHub should not set the INPUT_PARAMNAME environment variable to an empty value if the parameter is not present in the workflow

Possibly related issue for JavaScript actions: actions/toolkit#272

Resources that illustrate this issue:

As can be seen in the workflow output, results are different between running the Docker image directly or through the GitHub Action.

This can cause issues if a Docker image (or other action implementation) differentiates between 'empty' and 'not set'. If an action wants to set an empty value as the default value, then this should be done using the default property in the action definition.

Can you please get this fixed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Runner BugBug fix scope to the runnerbugSomething isn't workingpapercut

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions