Skip to content

Given a set of file paths, outputs the set of directories containing those files.

License

Notifications You must be signed in to change notification settings

Sebelino/action-dirname

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

action-dirname

Given a set of file paths, outputs the set of directories containing those files.

Inputs

files

Required A JSON array of file paths.

Outputs

directories

A JSON array of directories containing the files.

Example usage

jobs:
  sample:
    runs-on: ubuntu-latest
    steps:
      - uses: sebelino/[email protected]
        id: dirname
        with:
          files: '["main.tf", "versions.tf", "modules/vpc/sg.tf"]'
      - run: |
          # Will output: [".","modules/vpc"]
          echo ${{ toJson(steps.dirname.outputs.directories) }}

Development

$ go run ./app.go '["main.tf", "versions.tf", "modules/vpc/sg.tf"]'
[".","modules/vpc"]

About

Given a set of file paths, outputs the set of directories containing those files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published