actionlint
actionlint copied to clipboard
Probable false positive when linting action.yml on the image directive
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:
- Build the container image. The resulting image is tagged as
ghcr.io/super-linter/super-linter:latest
- Update the
image
section ofaction.yml
to point to the container image we just built. The resultingaction.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'
- 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: ./
| ^~