question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

timeout-minutes should allow for inputs parameter.

See original GitHub issue

Describe the bug step/job timeout-minutes only supports number and the runner will not run the workflow with an configurable inputs timeout.

timeout-minutes: ${{ inputs.test-timeout }}

To Reproduce

name: DotNet Test

on:
  workflow_call:
    inputs:
      test-timeout:
        required: false
        type: number
        default: 10

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Test
        timeout-minutes: ${{ inputs.test-timeout }}
        run: |
          dotnet test

Expected behavior With reusable workflows I would hope that I was allowed to pass a timeout-minutes as configurable.

Runner Version and Platform

N/A

What’s not working?

inputs.test-timeout specshell/.github/.github/workflows/dotnet-build.yml@main (Line: 98, Col: 26): Unexpected value '${{ inputs.test-timeout }}'

Job Log Output

N/A

Runner and Worker’s Diagnostic Logs

N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jetersencommented, Dec 13, 2021

great that a workaround exist but that just shows it should also allow inputs

2reactions
ChristopherHXcommented, Dec 13, 2021

I thought this was just documentation bug like for concurrency ( which accepts inputs, even if the documentations tells the opposite ), but you are right the official actions service blocks inputs as valid context and refuse to process your workflow.

Simple Workaround via matrix

name: DotNet Test

on:
  workflow_call:
    inputs:
      test-timeout:
        required: false
        type: number
        default: 10

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        test-timeout:
        - ${{ inputs.test-timeout }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Test
        timeout-minutes: ${{ matrix.test-timeout }}
        run: |
          dotnet test

The actions/runner accepts and runs your job with inputs in timeout-minutes, I tested it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workflow syntax for GitHub Actions
You must create a YAML file to define your workflow configuration. ... on.workflow_dispatch.inputs ... <job_id>.steps[*].timeout-minutes. jobs.
Read more >
Input step with timeout which continues with default ...
I have implemented similar behaviour recently. This declarative pipeline code requries BRANCH_TO_BUILD parameter to be provided on start ...
Read more >
Solved: Flow time out - Power Platform Community
The default timeout in flow is set to be 7 minutes. Try configuring the timeout in the action card and that will help...
Read more >
Allow input timeout parameter
input { message "Should we continue?" ok "Yes, we should." submitter "alice,bob" timeout: [time: 1234, unit: 'MINUTES'] parameters { string( ...
Read more >
SQL stored procedure on-premises data gateway timeout
After 2 minutes it signals a timeout, and from then on it seems to hammer ... Unfortunately, SQL Agent Jobs do not accept...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found