action-dirname

command module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 5 Imported by: 0

README

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/action-dirname@v1.0.5
        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"]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL