github-release icon indicating copy to clipboard operation
github-release copied to clipboard

Do globs work in `files`?

Open beyarkay opened this issue 3 years ago • 0 comments

Hi!

Thanks for the project, really appreciate it.

Just wondering if globs work in files? for example will the following:

jobs:
  build:
  ...
    steps:
    ...
    - uses: meeDamian/[email protected]
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        gzip: false
        allow_override: true
        files: build/*.txt

expand to upload every *.txt file under the build/ directory individually?

I've tried look through the source code, but my bash isn't as good as I thought. There's one comment that implies globbing does happen, but some small tests just in my shell make it seem like they don't work.

I think the following is the same as the source, but it doesn't glob, and echos calendars/*.ics

glob=build/*.txt
for filename in "$glob"; do
    echo $filename
done

However this example (which isn't the same) globs as expected:

for filename in build/*.txt; do
    echo $filename
done

If you can confirm what exactly the expected behaviour is, I'm happy to make a PR to add this feature!

Thanks!

beyarkay avatar Jul 13 '22 16:07 beyarkay