diff --git a/action.yml b/action.yml index f24f2bb..0cc2470 100644 --- a/action.yml +++ b/action.yml @@ -59,7 +59,7 @@ runs: PACKAGES: "${{ inputs.packages }}" - id: load-cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ~/cache-apt-pkgs key: cache-apt-pkgs_${{ env.CACHE_KEY }} @@ -83,6 +83,18 @@ runs: DEBUG: "${{ inputs.debug }}" PACKAGES: "${{ inputs.packages }}" + - id: save-cache + if: ${{ ! steps.load-cache.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: ~/cache-apt-pkgs + key: ${{ steps.load-cache.outputs.cache-primary-key }} + + - id: clean-cache + run: | + rm -rf ~/cache-apt-pkgs + shell: bash + - id: upload-logs if: ${{ inputs.debug == 'true' }} uses: actions/upload-artifact@v3