File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed 
security-actions/scan-docker-image Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -176,15 +176,21 @@ runs:
176176env :
177177        grype : ${{ steps.grype.outputs.grype-path }} 
178178
179+     - name : Get current date 
180+       id : date 
181+       shell : bash 
182+       run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT 
183+ 
179184    #  Explicitly check for Grype DB in Git Cache
180185    - name : Check Git Cache for Grype DB 
181186      id : grype_db_git_cache 
182187      uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809  #  v4.2.4
183188      with :
184189        #  Grype cache files are stored in `~/.cache/grype/db` on Linux/macOS
185190        path : ~/.cache/grype/db 
191+         #  Given the DB should not be less than 5 days old let's refetch it at least once per day
186192        key : | 
187-           cache_grype_db_v${{ steps.grype_metadata.outputs.grype_db_schema }} 
193+           cache_grype_db_v${{ steps.grype_metadata.outputs.grype_db_schema }}_${{ steps.date.outputs.date }}  
188194
189195#  Explicitly check for Grype DB in specified mirror
190196    - name : Parse Grype DB cache input 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments