File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,13 +119,21 @@ jobs:
119119 - name : repo checkout
120120 uses : actions/checkout@v7
121121
122- # Caches not accessed within the last week are evicted.
122+ # Caches not accessed within the last week are evicted. However, if a
123+ # cache is accessed at least once a week, it can remain permanently.
124+ # Use a weekly cache key for -master and -latest builds to keep them
125+ # reasonably fresh, while stable versions use a fixed key.
123126 # https://github.com/actions/cache#cache-limits
127+ - name : Get current week
128+ id : current-week
129+ if : matrix.openssl == 'openssl-master' || matrix.openssl == 'libressl-master' || matrix.openssl == 'aws-lc-latest'
130+ run : echo "week=$(date -u '+%Y%W')" >> "$GITHUB_OUTPUT"
131+
124132 - id : cache-openssl
125133 uses : actions/cache@v6
126134 with :
127135 path : ~/openssl
128- key : openssl-${{ runner.os }}-${{ matrix.openssl }}-${{ matrix.append-configure || 'default' }}
136+ key : openssl-${{ runner.os }}-${{ matrix.openssl }}-${{ matrix.append-configure || 'default' }}-${{ steps.current-week.outputs.week || 'default' }}
129137
130138 - name : Compile OpenSSL library
131139 if : steps.cache-openssl.outputs.cache-hit != 'true'
You can’t perform that action at this time.
0 commit comments