Fix run arg order and abort on any failure.

This commit is contained in:
awalsh128 2021-10-12 17:34:20 -07:00
parent d354c1417a
commit d9e6c214de
2 changed files with 4 additions and 1 deletions

View file

@ -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

3
run.sh
View file

@ -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.