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

[feat req] - enhance if-no-files-found #306

Open
codezninja opened this issue Mar 11, 2022 · 2 comments
Open

[feat req] - enhance if-no-files-found #306

codezninja opened this issue Mar 11, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@codezninja
Copy link

What would you like to be added?

Support for if-no-files-found for some files to not fail completey

Lets say we are creating a generic step to upload files

        uses: actions/upload-artifact@v2
        with:
          name: java-artifact
          path: |
            ${{ github.workspace }}/target/*.war
            ${{ github.workspace }}/target/*.jar
          if-no-files-found: error

I would like it to error out only if it found 0 matches. If it found 1 match still pass through

Why is this needed?

To decrease the need to have conditional steps in the workflow to do file type checks.

@codezninja codezninja added the enhancement New feature or request label Mar 11, 2022
@codezninja
Copy link
Author

Actually looking through the source it seems like this should be supported but I'm getting an error even though one of the path should exist

@codezninja
Copy link
Author

For now I've gotten around this but using []

      - name: Upload java artifact
        uses: actions/upload-artifact@v3
        with:
          name: java-artifact
          path: |
            ${{ github.workspace }}/target/*.[jw]ar
          if-no-files-found: error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant