Skip to content

Local file error when using a remote to get the local file #40

Closed

Description

@travis-crowder-kr

If you checkout a repository to a local path and try to use it, linting will fail with a file not found.

Example:

- name: Checkout token action
  uses: actions/checkout@v2
  with: 
    repository: qwerty/create-github-server-token
    path: ./.helpers/create-github-server-token

- name: Generate GitHub Token
  uses: ./.helpers/create-github-server-token
  id: create-token
...
neither action.yaml nor action.yml is found in directory

This error is expected because the file does not exist locally; it gets downloaded in the pipeline.

Activity

  1. rhysd commented on Aug 25, 2021

    @rhysd
    Owner

    The use case makes sense. When I implemented the check for local action, I did not assume that the action is checked out from somewhere.

    I agree that the check should not raise an error when no action is found in the directory.

    Related to #25

  2. rhysd commented on Aug 25, 2021

    @rhysd
    Owner

    Please try -ignore option meanwhile.

    actionlint -ignore 'neither action\.yaml nor action\.yml is found in directory'
    
  3. rhysd commented on Aug 25, 2021

    @rhysd
    Owner

    @travis-crowder-kr BTW, what is the reason not to use the action directly?

    - name: Generate GitHub Token
      uses: qwerty/create-github-server-token
      id: create-token
  4. rhysd commented on Sep 4, 2021

    @rhysd
    Owner

    The fix was released at v1.6.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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