-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM julia:latest | ||
|
||
LABEL "com.github.actions.name" = "JuliaFormatter" | ||
LABEL "com.github.actions.description" = "Format Julia code using JuliaFormatter.jl" | ||
LABEL "com.github.actions.icon" = "code" | ||
LABEL "com.github.actions.color" = "yellow" | ||
|
||
LABEL "repository"="https://github.com/domluna/action-JuliaFormatter" | ||
LABEL "homepage"="https://github.com/domluna/action-JuliaFormatter" | ||
LABEL "maintainer"="Dominique Luna <dluna132@gmail.com>" | ||
|
||
RUN julia -e 'using Pkg; Pkg.add("JuliaFormatter"); using JuliaFormatter' | ||
|
||
ENV PATH="$HOME/.julia/dev/JuliaFormatter.jl/bin:$PATH" | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# action-JuliaFormatter | ||
Github action for JuliaFormatter.jl | ||
# Github Action For JuliaFormatter.jl | ||
|
||
Github action that runs [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl) on your `.jl` files. | ||
|
||
## Example | ||
|
||
This will recursively format all `.jl` files your repository with default indentation width and maximum line margin. | ||
`-v` toggles verbose output. | ||
|
||
See the help message in [this file](https://github.com/domluna/JuliaFormatter.jl/blob/master/bin/format.jl) for detailed description of flags/arguments. | ||
|
||
```workflow | ||
workflow "Example Workflow" { | ||
on = "push" | ||
resolves = ["Format"] | ||
} | ||
action "Format" { | ||
uses = "domluna/action-JuliaFormatter@master" | ||
args = "-v ." | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
sh -c "format.jl $*" |