Skip to content

False Positive with actions/download-artifact Action download-path Output #255

Open
@bflad

Description

@bflad

Description

Version (installed via brew install actionlint):

$ actionlint -version
1.6.22
installed by building from source
built with go1.19.2 compiler for darwin/arm64

Given these steps:

# ...
      - if: inputs.release-notes
        id: release-notes-download
        name: Release Notes Download
        uses: actions/download-artifact@v3
        with:
          name: release-notes
          path: /tmp
      - if: inputs.release-notes
        name: goreleaser release (with release notes)
        uses: goreleaser/goreleaser-action@v4
        with:
          args: release --release-notes ${{ steps.release-notes-download.outputs.download-path }}/release-notes.txt --rm-dist ${{ inputs.goreleaser-release-args }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

Returns the following error:

$ actionlint             
.github/workflows/community.yml:59:45: property "download-path" is not defined in object type {} [expression]
   |
59 |           args: release --release-notes ${{ steps.release-notes-download.outputs.download-path }}/release-notes.txt --rm-dist ${{ inputs.goreleaser-release-args }}
   |  

The full workflow file can be found here: https://github.com/hashicorp/ghaction-terraform-provider-release/blob/ef2f0c92ac9b5b15fd802308798f6e3e00840e53/.github/workflows/community.yml

actions/download-artifact (at least v3) supports a download-path output:

This output does not appear to be defined in the popular actions file:

"actions/download-artifact@v3": {
Name: "Download a Build Artifact",
Inputs: ActionMetadataInputs{
"name": {"name", false},
"path": {"path", false},
},
},

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions