Skip to content

LesnyRumcajs/leptosfmt-action

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

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Marketplace Test leptosfmt action

leptosfmt action

This action downloads and runs leptosfmt on your Rust codebase. See the leptosfmt repository for more information.

Passing arguments

leptosfmt arguments can be passed to the action via the args parameter.

The action also supports some additional arguments.

Inputs

Argument Default Description
args ./**/*.rs --check See Leptosfmt's documentation for all arguments and values
debug false Enable debug output in action (set -x). Helpful for troubleshooting
failOnError true Fail workflow run on error (i.e. when leptosfmt exit code is not 0)
leptosfmtVersion 0.1.32 Overwrite the leptosfmt version to be used
output leptosfmt_output.txt Output from leptosfmt will be written to this file

Outputs

Output Description
exit_code Exit code of leptosfmt

Sample workflow

name: leptosfmt

on:
  workflow_dispatch:
  pull_request:
  push:

jobs:
  leptosfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: LesnyRumcajs/leptosfmt-action@v0.1.0

Sample workflow with custom arguments

name: leptosfmt

on:
  workflow_dispatch:
  pull_request:
  push:

jobs:
  leptosfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: leptosfmt
        id: leptosfmt
        uses: LesnyRumcajs/leptosfmt-action@v0.1.0
        with:
          failOnError: false
      - name: print outputs
        if: steps.leptosfmt.outputs.exit_code != 0
        run: |
          cat leptosfmt_output.txt

Reporting issues

If you encounter any issues with this action, please report them here. If the issue is with leptosfmt itself, please report it to the leptosfmt repository.