actions / upload-artifact

MIT License
3.03k stars 686 forks source link

[bug] if-no-files-found: error doesn't check all files #457

Open nicolalunghi-xlnx opened 8 months ago

nicolalunghi-xlnx commented 8 months ago

What happened?

if I use the action like this:

 - uses: actions/upload-artifact@v3
        with:
          if-no-files-found: error
          path: |
            first_dir/
            second_dir/

no error is emitted if second_dir doesn't exist

What did you expect to happen?

to get an error if any of the files/dir is missing

How can we reproduce it?

 - run: mkdir first_dir && touch first_dir/file1.txt
 - uses: actions/upload-artifact@v3
      with:
        if-no-files-found: error
        path: |
          first_dir/
          second_dir/

Anything else we need to know?

No response

What version of the action are you using?

v3.1.3

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

no

gmseb commented 3 months ago

Maybe it needs a new flag if-not-all-files-found for this case. Before we have that, I agree it's a bug.