Skip to content
list

GitHub Action

Path lister action

1.0 Latest version

Path lister action

list

Path lister action

Lists path of all the files of specified type in the specificied folder/directory

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Path lister action

uses: Rishabh510/Path-lister-action@1.0

Learn more about this action in Rishabh510/Path-lister-action

Choose a version

Path lister action

Path lister

A GitHub action to list path of all files with user specified extension in the folder/directory specified by the user on every push. Particularly useful for finding path of similar files in big projects.

Inputs

Input Description
path(required) Path to find the files
type(required) Type of files to find

Outputs

Output Description
path_count Number of files found with the extension
paths Path of all the files with the extension

Example

name: Path lister example
on: [push]
jobs:
  list:
    name: Path lister
    runs-on: ubuntu-latest
    steps:
      - name: Set up Python 3.7
        uses: actions/setup-python@v1
        with:
          python-version: "3.7"

      - uses: actions/checkout@v1

      - name: Fetch action
        id: pl
        uses: Rishabh510/Path-lister-action@master
        with:
          path: ".github/"
          type: ".yml"

      - name: Output results
        run: |
          echo "Found ${{ steps.pl.outputs.path_count }} file(s) with this extension:"
          for i in ${{ steps.pl.outputs.paths }}; do
          echo $i
          done

Output generated for the above yaml file:

example_output

License

MIT license