Github action workflow dispatch inputs empty string with default value

Viewed 546

We would like to add an input called date_to which has a placeholder '2022-05-05T00:00:00.000' but also allow the user to delete this value and run the code. We would expect that the value is an empty string in this case. But the actual behaviour is that we get the placeholder '2022-05-05T00:00:00.000'

name: Total hour

on:
  workflow_dispatch:
    inputs:
      date_from:
        description: 'Start date'
        required: true
        default: '2022-05-01T00:00:00.000'
      date_to:
        description: 'End date'
        required: false
        default: '2022-05-05T00:00:00.000'

jobs:
  total_hour:
    runs-on: ubuntu-18.04
    timeout-minutes: 5
    name: Business hour
    steps:
      - uses: actions/checkout@v2

      - name: Info
        run: |
          echo "Start date : ${{ github.event.inputs.date_from }}"
          echo "end date : ${{ github.event.inputs.date_to }}"

This prints:

Start date : 2022-05-01T00:00:00.000
end date : 2022-05-05T00:00:00.000

How to make it print, while still showing the placeholder value

Start date : 2022-05-01T00:00:00.000
end date : 
0 Answers
Related