From d9e6c214de977ad6a94ed1ce56e5deaefc91ec2e Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Tue, 12 Oct 2021 17:34:20 -0700 Subject: [PATCH] Fix run arg order and abort on any failure. --- action.yml | 2 +- run.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2ad3a98..c40992a 100644 --- a/action.yml +++ b/action.yml @@ -22,5 +22,5 @@ runs: key: cache-apt-pkgs_${{ inputs.cache_key }} - name: Install Packages - run: ${{ github.action_path }}/run.sh / ~/cache-apt-pkgs ${{ inputs.packages }} + run: ${{ github.action_path }}/run.sh ~/cache-apt-pkgs / ${{ inputs.packages }} shell: bash diff --git a/run.sh b/run.sh index d2c959c..ecc7212 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Exit on any failure. +set -e + # Directory that holds the cached packages. cache_dir=$1 # Root directory to untar the cached packages to.