mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2024-12-22 02:35:30 +00:00
Clean cache directory after use (#95)
This commit is contained in:
parent
854bb539e1
commit
946776e670
14
action.yml
14
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
|
||||
|
|
Loading…
Reference in a new issue