Skip to content

Commit

Permalink
Better handling of FPM options via FPMOPT environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bpicode committed Dec 16, 2019
1 parent a4d3b91 commit 016f53c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
- name: Package
uses: bpicode/github-action-fpm@master
with:
fpm-args: '--debug -n mypackage -t deb -s dir ./build'
fpm_args: './build'
fpm_opts: '--debug -n mypackage -t deb -s dir'
```
## Inputs and Outputs

Expand Down
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ branding:
icon: 'package'
color: 'green'
inputs:
fpm-args:
fpm_opts:
description: 'Options passed to the fpm cli tool'
required: true
fpm_args:
description: 'Arguments passed to the fpm cli tool'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.fpm-args }}
- ${{ inputs.fpm_args }}
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env sh

fpm $1
set -e

FPMOPTS="${INPUT_FPM_OPTS}" fpm $@

0 comments on commit 016f53c

Please sign in to comment.