Skip to content

Commit

Permalink
added GitHub Action and Workflow example
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 c786396 commit 0965c2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/toml-sort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Toml Sort
on: push

jobs:
toml-sort:
name: Toml Sort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
23 changes: 23 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "TOML Sort"
author: "Off-Narrative Labs"
description: "Sort and format TOML files"
branding:
icon: "check-circle"
color: "green"

inputs:
filename:
description: "Name of the file(s) to check, default is Cargo.toml"
required: true
default: "Cargo.toml"

runs:
using: "composite"
steps:
- name: "Installing TOML Sort"
shell: "bash"
run: cargo install --git https://github.com/Off-Narrative-Labs/toml_sort
- name: "Running TOML Sort"
shell: "bash"
run: find . -name Cargo.toml | xargs -L1 toml-sort --check

0 comments on commit 0965c2a

Please sign in to comment.