diff --git a/README.md b/README.md index 051595a..2f947a2 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/action.yml b/action.yml index c7173b2..af455aa 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index fbd2863..b22541e 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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