Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
domluna committed Sep 7, 2019
1 parent 0d30358 commit 17a8c4b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
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"]
25 changes: 23 additions & 2 deletions README.md
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 ."
}
```

5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

sh -c "format.jl $*"

0 comments on commit 17a8c4b

Please sign in to comment.