Skip to content

Commit

Permalink
move purge caches
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jul 19, 2023
1 parent cc7a23c commit b6a6da6
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
name: Nix CI
runs-on: ${{ matrix.os }}
needs: build
permissions:
# required by the `purge-cache` action
actions: write
steps:
- name: Checkout this repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -69,17 +66,6 @@ jobs:
cache-${{ matrix.os }}-
# -------- THIS ACTION --------

# Purge after restoring a cache
# In this case, the post phase of `cache-nix-action` won't find a cache
# And thus will save a new one
- uses: deemp/purge-cache@v1
with:
debug: true
created: true
accessed: true
# 3 days
max-age: 86400

# Uncomment to debug this job
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -128,7 +114,7 @@ jobs:
- true
- false

remove-old-workflows:
remove-old-data:
name: Remove old data
runs-on: ubuntu-22.04
needs: test
Expand All @@ -140,6 +126,15 @@ jobs:
with:
retain_days: 7
keep_minimum_runs: 7

# Purge old caches
- uses: deemp/purge-cache@v1
with:
debug: true
created: true
accessed: true
# 3 days
max-age: 86400

name: Nix CI
"on":
Expand Down

0 comments on commit b6a6da6

Please sign in to comment.