Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unrecognized if-no-files-found input. Provided: . Available options: warn,error,ignore #255

Open
2 of 6 tasks
zivkovic opened this issue Oct 11, 2021 · 7 comments · May be fixed by #348
Open
2 of 6 tasks
Labels
bug Something isn't working

Comments

@zivkovic
Copy link

Describe the bug
I'm running a self hosted runner and the workflow job is ran in a container. When a test fails and should upload the screenshots, the following error is displayed. As seen in screenshot below, I have set the if-no-files-found to ignore, but error still displays as if this was configured incorrectly.

Version

  • V1
  • V2

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

Screenshots

The displayed error message:
image

The start of the workflow:
image

If you require more info, let me know.

@zivkovic zivkovic added the bug Something isn't working label Oct 11, 2021
@aljazkosir
Copy link

I'm also facing the same issue

@vafanasy
Copy link

vafanasy commented Nov 1, 2021

We have similar issue, but as warning and looks like this "if-no-files-found" isn't working.

Warning: Unexpected input(s) 'if-no-files-found', valid inputs are ['name', 'path']
with:
    name: test-results
    path: target/surefire-reports
    if-no-files-found: ignore
Error: Path does not exist /some_path/target/surefire-reports
Error: Exit code 1 returned from process: file name '/home/runner/runners/2.283.3/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.

@shanepowell-ast
Copy link

shanepowell-ast commented Apr 26, 2022

I just want to add.. I'm experiencing this same issue. Also on a self-hosted linux based runner.
Nothing I do seems to resolve the error. I've tried leaving the if-no-files-found field out, specified an explicit value, with and with out quotes. Even tried a numerical index. Tried @v2, @V3 and @main They all seem to show the same issue.
It does appear to be related to running on a self-hosted runner.
Changing only my "runs-on" from self-hosted to ubuntu-latest fixes the issue.
For added reference, my self-hosted runner is just a set of simple ubuntu-server headless machine.

edit: update.. oddly enough, the upload succeeds! Despite the error.

Edit: Forked the main branch to try a test.
I modified input-helper.ts with the following. And it at least works now on my self-hosted runner.
For some unknown reason, the noFileBehavior value is coming in as a blank, instead of the default 'warn'.

const ifNoFilesFound = core.getInput(Inputs.IfNoFilesFound)
  var noFileBehavior: NoFileOptions = NoFileOptions[ifNoFilesFound]

  if (!noFileBehavior) {
    noFileBehavior = NoFileOptions['warn']
    core.warning(
      `Unrecognized ${
        Inputs.IfNoFilesFound
      } input. Provided: ${ifNoFilesFound}. Available options: ${Object.keys(
        NoFileOptions
      )}. Defaulting to warn.`
    )
  }

@umutozd
Copy link

umutozd commented Sep 26, 2022

We are also experiencing this issue. Our configuration looks like the following:

- uses: actions/upload-artifact@v3
  with:
    name: <artifact-name>
    path: |
      path/to/file1
      path/to/file2
      path/to/file3

and exactly the below error is printed once this action runs:

Error: Unrecognized if-no-files-found input. Provided: . Available options: warn,error,ignore

I have tried the below configuration too, with the same error message.

- uses: actions/upload-artifact@v3
  with:
    name: <artifact-name>
    path: |
      path/to/file1
      path/to/file2
      path/to/file3
    if-no-files-found: warn

The odd thing is, the upload of files succeed. The problem is that this workflow looks to be failed because of this if-no-files-found issue.

@umutozd umutozd linked a pull request Sep 26, 2022 that will close this issue
@ameza
Copy link

ameza commented Mar 21, 2023

having the same issue, is there a fix ?

@raxden
Copy link

raxden commented May 15, 2023

same here!

@wind57
Copy link

wind57 commented Sep 14, 2023

ain't this a beauty, I am already tired of countless github actions issues we are facing :) I hope it's the last time I ever use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants