Skip to content

Input file documentation does not reflect actual functionality #1416

@gnplescan

Description

@gnplescan

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

I see that documentation specifies description for input file to be 'Path to the Dockerfile. (default {context}/Dockerfile)', which implies that context input will be the expected prefix (see at https://github.com/docker/build-push-action/blob/v6/README.md?plain=1#L240).

From experimentation that does not seem to be the case, and I see nothing the action code to reflect that description either,
at https://github.com/docker/build-push-action/blob/v6/action.yml#L47
or at https://github.com/docker/build-push-action/blob/master/src/context.ts#L149

Either documentation should be fixed, or functionality should be implemented to reflect documentation.

Expected behaviour

Context input should be used as the default prefix for the file input.

Actual behaviour

FIle input has no default prefix and is used as is, and should include the same path as the context.

Repository URL

No response

Workflow run URL

No response

YAML workflow

Extract
    - name: Build
      uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
      id: docker
      with:
        context: ${{ inputs.context }}
        file: ${{ inputs.file }}
        load: true
        labels: ${{ inputs.labels }}
        tags: ${{ inputs.tags }}
        secrets: ${{ inputs.secrets }}
        secret-envs: ${{ inputs.secret-envs }}
        secret-files: ${{ inputs.secret-files }}

Workflow logs

Extract
/usr/bin/docker buildx build --file Dockerfile ./examples/basic-npm

BuildKit logs


Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions