diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a414425..f2ccee5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - + - run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt - name: Single @@ -36,7 +36,8 @@ jobs: artifact-*.txt README.md - - run: | + - name: Add artifacts/artifact.txt + run: | mkdir artifacts echo "Build some tool and generate some artifacts" > artifacts/artifact.txt @@ -46,7 +47,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} files: artifacts/artifact.txt - - run: | + - name: Add artifacts/*.md + run: | echo "tip hello" > artifacts/hello.md echo "tip world" > artifacts/world.md @@ -55,3 +57,14 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} files: artifacts/* + + - name: Add artifacts/subdir + run: | + mkdir artifacts/subdir + echo "Test recursive glob" > artifacts/subdir/deep_file.txt + + - name: Directory wildcard (recursive) + uses: ./ + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: artifacts/** diff --git a/tip.py b/tip.py index d792172..4f1324a 100755 --- a/tip.py +++ b/tip.py @@ -25,7 +25,7 @@ if len(args) == 0: raise(Exception("Glob patterns need to be provided as positional arguments or through envvar 'INPUT_FILES'!")) for item in args: - items = glob(item) + items = [fname for fname in glob(item, recursive=True) if not Path(fname).is_dir()] print("glob(%s)" % item, "->", items) files = files + items