Skip to content

Commit

Permalink
fixed outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
skynet-core committed Dec 7, 2020
1 parent 68bf816 commit b9c139e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
## Example usage

- name: Create deb package
uses: skynet-core/nfpm@v1.2
uses: skynet-core/nfpm@v1.3
id: deb-package
with:
config: "custom.yaml"
packager: "deb"
- name: Create rpm package
uses: skynet-core/nfpm@v1.2
uses: skynet-core/nfpm@v1.3
id: rpm-package
with:
config: "custom.yaml"
Expand Down
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ inputs:
outputs:
package:
description: "Created package's name"
value:
runs:
using: 'docker'
image: 'docker://smartcoder/nfpm:v1.2'
image: 'docker://smartcoder/nfpm:v1.3'
10 changes: 6 additions & 4 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

if [ "x$INPUT_CONFIG" != "x" ] && [ "x$INPUT_PACKAGER" != "x" ]; then
if [ "x$INPUT_TARGET" != "x" ]; then
$name=$(sudo sh -c "nfpm pkg -f $INPUT_CONFIG -p $INPUT_PACKAGER -t $INPUT_TARGET" | grep "created package:" | sed 's|created package: ||g')
echo "::set-output name=package::$name"
name=$(sudo sh -c "nfpm pkg -f $INPUT_CONFIG -p $INPUT_PACKAGER -t $INPUT_TARGET" | grep "created package:" | sed 's|created package: ||g')
else
$name=$(sudo sh -c "nfpm pkg -f $INPUT_CONFIG -p $INPUT_PACKAGER" | grep "created package:" | sed 's|created package: ||g')
echo "::set-output name=package::$name"
name=$(sudo sh -c "nfpm pkg -f $INPUT_CONFIG -p $INPUT_PACKAGER" | grep "created package:" | sed 's|created package: ||g')
fi
if [ "x$name" == "x" ]; then
exit 1
fi
echo "::set-output name=package::$name"
else
sh -c "$@"
fi

0 comments on commit b9c139e

Please sign in to comment.