action.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: 'Save Cache'
  2. description: 'Archive and upload cache to GitHub Releases'
  3. inputs:
  4. cache_path:
  5. description: 'Path where cache is saved'
  6. required: true
  7. type: string
  8. cache_key:
  9. description: 'Unique key for the cache'
  10. required: true
  11. type: string
  12. cache_bucket:
  13. description: 'The tag name for the release (e.g., general-cache)'
  14. required: true
  15. default: 'general-cache'
  16. github_token:
  17. description: 'GitHub Token'
  18. required: true
  19. compression_level:
  20. description: 'Compression level (0-9). 0 = No compression, 1 = Fast, 19 = Best.'
  21. required: false
  22. type: number
  23. default: 6
  24. working_dir:
  25. description: 'Path where .git folder exists (use only if you clone multiple repos)'
  26. required: false
  27. type: string
  28. debug:
  29. description: 'Enable Logs'
  30. required: false
  31. type: boolean
  32. default: false
  33. runs:
  34. using: 'composite'
  35. steps:
  36. - name: Archive Cache
  37. uses: ./.github/actions/cache-archive
  38. with:
  39. cache_path: ${{ inputs.cache_path }}
  40. cache_key: ${{ inputs.cache_key }}
  41. cache_bucket: ${{ inputs.cache_bucket }}
  42. compression_level: ${{ inputs.compression_level }}
  43. working_dir: ${{ inputs.working_dir }}
  44. debug: ${{ inputs.debug }}
  45. - name: Upload Cache
  46. uses: ./.github/actions/cache-upload
  47. with:
  48. cache_key: ${{ inputs.cache_key }}
  49. cache_bucket: ${{ inputs.cache_bucket }}
  50. github_token: ${{ inputs.github_token }}
  51. compression_level: ${{ inputs.compression_level }}
  52. debug: ${{ inputs.debug }}