Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
Signed-off-by: muraca <[email protected]>
  • Loading branch information
muraca committed Oct 3, 2023
1 parent cd7d1c1 commit 272b1f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TOML Sort

Simple tool for sorting toml files via cli or ci. It was made with `Cargo.toml` files in mind but is likely useful elsewhere.

## Usage
## CLI Usage

### Installation

Expand All @@ -23,7 +23,7 @@ toml-sort [files]
toml-sort --check [files]
```

### GitHub Action
## GitHub Action

This will only check `./Cargo.toml`:
```yaml
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
required: true
default: "Cargo.toml"
all:
description: "Performs check on all the TOML files it can find"
description: "Performs check on all the TOML files it can find starting from current directory"
required: true
default: false

Expand All @@ -22,11 +22,11 @@ runs:
shell: "bash"
run: cargo install --git https://github.com/Off-Narrative-Labs/toml_sort
- if: ${{ inputs.all }}
name: "Running TOML Sort on all files"
name: "Running TOML Sort check on all TOML files starting from current directory"
shell: "bash"
run: find . -name "*.toml" | xargs -L1 toml-sort --check
- if: ${{ !inputs.all }}
name: "Running TOML Sort on given files"
name: "Running TOML Sort check on given files"
shell: "bash"
run: toml-sort --check {{ inputs.files }}

0 comments on commit 272b1f5

Please sign in to comment.