Skip to content

Commit

Permalink
Add optional build-app and build-flags options (#1)
Browse files Browse the repository at this point in the history
Draws more options from [felt/ultimate-elixir-ci's
Action](https://github.com/felt/ultimate-elixir-ci/blob/main/.github/actions/elixir-setup/action.yml)
that I overlooked on v1.0.0.

```yaml
build-app:
  description: Compile application using `mix compile`.
  default: true
build-flags:
  description: Additional flags to pass to `mix compile`.
  default: "--all-warnings"
```
  • Loading branch information
jgarber623-cargosense authored Mar 4, 2024
2 parents 7e11a14 + 84a8a41 commit 85ca7c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
# invalidate existing caches.
# Default: "v1"
cache-key: ""
# Compile application using `mix compile`.
# Default: true
build-app: true
# Additional flags to pass to `mix compile`.
# Default: "--all-warnings"
build-flags: ""
```
### Basic Usage
Expand Down
9 changes: 8 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ inputs:
An arbitrary string added to the derived cache key names. Set or change to
invalidate existing caches.
default: "v1"
build-app:
description: Compile application using `mix compile`.
default: true
build-flags:
description: Additional flags to pass to `mix compile`.
default: "--all-warnings"

outputs:
otp-version:
Expand Down Expand Up @@ -105,5 +111,6 @@ runs:
shell: bash

- name: Compile application
run: mix compile
if: inputs.build-app == 'true'
run: mix compile ${{ inputs.build-flags }}
shell: bash

0 comments on commit 85ca7c9

Please sign in to comment.