Skip to content

Commit

Permalink
move purge to the end of test
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jul 20, 2023
1 parent 28c95cf commit 682bb81
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -102,6 +103,16 @@ jobs:
- name: Show profile
run: nix profile list

# Purge old caches just before saving a new one
# in the Post phase of the cache-nix-action.
- uses: deemp/purge-cache@v1
with:
debug: true
created: true
accessed: true
# 3 days
max-age: 86400

strategy:
matrix:
Expand All @@ -113,28 +124,6 @@ jobs:
do-cache:
- true
- false

remove-old-data:
name: Remove old data
runs-on: ubuntu-22.04
needs: test
permissions:
actions: write
steps:
- name: Delete workflow runs
uses: Mattraks/[email protected]
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 682bb81

Please sign in to comment.