leptosfmt action
January 26, 2025 ยท View on GitHub
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.