actions / actions/runner

Running pre-built docker action does not provide required default values

Open
#989 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-investigation Runner Bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
Running an action without providing required inputs that have a default will use the default values. Running the same action pre-built as a docker image does not show this behaviour.

To Reproduce
Steps to reproduce the behavior:

  1. Use an action that has required inputs, e.g. EnricoMi/download-buildkite-artifact-action:
      uses: EnricoMi/download-buildkite-artifact-action@v1
      with:
        buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
  1. The github_token input is defined required in the action.yml but not given here.

  2. This makes the runner execute the action with the default value: https://github.com/horovod/horovod/runs/1912170696#step:4:2

Run EnricoMi/download-buildkite-artifact-action@v1
  with:
    buildkite_token: ***
    github_token: ***
    log_level: INFO
  1. When I now switch over to the identical but pre-built action, the default values for missing inputs are not provided (e.g. github_token or log_level):
      docker://ghcr.io/enricomi/download-buildkite-artifact-action:v1
      with:
        buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}

https://github.com/horovod/horovod/runs/1912156006#step:4:2

Run docker://ghcr.io/enricomi/download-buildkite-artifact-action:v1
  with:
    buildkite_token: ***

Expected behavior

Running the action should behave identical, no matter if run as pre-build docker image (docker://ghcr.io/enricomi/download-buildkite-artifact-action:v1) or from sources (EnricoMi/download-buildkite-artifact-action@v1).

Runner Version and Platform

Current version running at GitHub. Above example runs on ubuntu-latest.

Job Log Output

https://github.com/horovod/horovod/runs/1912156006#step:4:2
https://github.com/horovod/horovod/runs/1912170696#step:4:2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the two cited workflow runs and the referenced action.yml to confirm how missing defaulted inputs differ between source-based and docker actions. Start from the runner's action-input handling and trace the docker action entry point; done means both invocation forms provide the same required defaults, including github_token and log_level, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, github-actions
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.