GH actions inputs defaults not working when ENV present


I got some problem with a custom action that does not set the default value when an ENV is present, but empty.

I created a custom action that takes an input:

name: "build"
description: build with parameter
    description: "the image tag"
    required: true
    default: latest

The action is called within the workflow file:

- name: build
      uses: ./actions/action-name
        IMAGE_TAG: "${{ env.RELEASE_VERSION }}"

A custom script that is run in a previous workflow step sets the ENV RELEASE_VERSION by adding this to $GITHUB_ENV.


So the run environment has something like when the ENV is empty:

# printenv

To the problem:
I can’t get the default value set from the custom action.
I would expect that the action would set IMAGE_TAG to the default value if the input parameter is empty.
Apparently it does not set the default value when the parameter is present.
Something like unset RELEASE_VERSION does not work since it is still present in the GITHUB_ENV file.

What am I missing? Is this expected behaviour?