From d3f2f7ce23aba65a543a1bf23b324ceaf21370c1 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Sat, 16 Oct 2021 11:15:06 -0700 Subject: [PATCH] Fix conditionals. --- action.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 1675e0c..fb76c9e 100644 --- a/action.yml +++ b/action.yml @@ -34,12 +34,10 @@ runs: path: ~/cache-apt-pkgs key: cache-apt-pkgs_${{ hashFiles('/tmp/package_list.txt') }} - - name: Install and Cache Packages - if: steps.load-pkg-cache.outputs.cache-hit != 'true' - run: ${{ github.action_path }}/install_and_cache.sh ~/cache-apt-pkgs ${{ inputs.packages }} - shell: bash - - - name: Restore Cached Packages - if: steps.load-pkg-cache.outputs.cache-hit != 'true' - run: ${{ github.action_path }}/run.sh ~/cache-apt-pkgs / + - name: Load Packages + run: | + if [ ${{ steps.load-pkg-cache.outputs.cache-hit }} == "true" ]; then + ${{ github.action_path }}/install_and_cache.sh ~/cache-apt-pkgs ${{ inputs.packages }} + else + ${{ github.action_path }}/run.sh ~/cache-apt-pkgs / shell: bash