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

Support action issues a warning instead of fail when no file exist in the given path #332

Closed
capri-xiyue opened this issue Jun 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@capri-xiyue
Copy link

TL;DR

Currently, it will fail when no file exist in the given path with error google-github-actions/upload-cloud-storage failed with: ENOENT: no such file or directory. It will be useful that users have the option to choose whether the action should fail or issue a warning when no file exists.

Detailed design

No response

Additional information

No response

@capri-xiyue capri-xiyue added the enhancement New feature or request label Jun 14, 2023
@sethvargo
Copy link
Member

Hey @capri-xiyue - I think it would be better to skip the step altogether with an if statement:

- steps:
  - uses: 'google-github-actions/upload-cloud-strorage@v1'
    if: '${{ hashFiles(''./path/*'') == '''' }}'

That is strictly more efficient because then GitHub doesn't even download the action source.

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

No branches or pull requests

2 participants