Skip to content

Probable false positive when linting action.yml on the image directive #428

@ferrarimarco

Description

@ferrarimarco

Hi, and thanks for working on actionlint! :)

After updating to 1.7.0, actionlint reports what it's likely a false positive.

As part of the test suite of a container-based action, we do the following:

  1. Build the container image. The resulting image is tagged as ghcr.io/super-linter/super-linter:latest
  2. Update the image section of action.yml to point to the container image we just built. The resulting action.yml is similar to the following:
name: 'Super-Linter'
author: 'Super-linter contributors'
description: 'Super-linter is a ready-to-run collection of linters and code analyzers, to help validate your source code.'
runs:
  using: 'docker'
  image: 'ghcr.io/super-linter/super-linter:latest'
  1. Run the action using the container image we just built:
      - name: Test Local Action (debug log)
        uses: ./
        env:
          ...

As part of this test suite, we also run actionlint. It gets confused when looking at the updated action.yml as follows:

.github/workflows/ci.yml:163:15: file "ghcr.io/super-linter/super-linter:latest\\" does not exist in "/github/workspace". it is specified at "image" key in "runs" section in "Super-Linter\\" action [action]
      |
  163 |         uses: ./
      |               ^~
  .github/workflows/ci.yml:163:15: the local file "ghcr.io/super-linter/super-linter:latest" referenced from "image" key must be named "Dockerfile" in "Super-Linter" action. the action is defined at "/github/workspace" [action]
      |
  163 |         uses: ./
      |               ^~

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions