From 8f2c275875df45814637564fe0e50a0e1bff5ad3 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Thu, 21 Oct 2021 23:04:42 -0700 Subject: [PATCH] Remove refresh feature. --- README.md | 1 - action.yml | 1 - post_cache_action.sh | 7 ++----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 941bf8f..927e93a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Create a workflow `.yml` file in your repositories `.github/workflows` directory * `packages` - Space delimited list of packages to install. * `version` - Version of cache to load. Each version will have its own cache. Note, all characters except spaces are allowed. -* `refresh` - Refresh / upgrade the packages in the same cache. ### Outputs diff --git a/action.yml b/action.yml index 6eccab2..e717de5 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,6 @@ runs: ~/cache-apt-pkgs \ / \ "${{ steps.load-cache.outputs.cache-hit }}" \ - "${{ inputs.refresh }}" \ ${{ inputs.packages }} echo "::set-output name=package-version-list::$(cat ~/cache-apt-pkgs/manifest.log)" shell: bash diff --git a/post_cache_action.sh b/post_cache_action.sh index f12db41..54d7cec 100755 --- a/post_cache_action.sh +++ b/post_cache_action.sh @@ -13,15 +13,12 @@ cache_restore_root=$2 # Indicates that the cache was found. cache_hit=$3 -# Indicates that a refresh of the packages in the cache is required. -refresh=$4 - # List of the packages to use. -packages="${@:5}" +packages="${@:4}" script_dir=$(dirname $0) -if [ "$cache_hit" == false ] || [ "$refresh" == true ]; then +if [ "$cache_hit" == false ]; then $script_dir/install_and_cache_pkgs.sh ~/cache-apt-pkgs $packages else $script_dir/restore_pkgs.sh ~/cache-apt-pkgs $cache_restore_root