name: 'Cache Wrt Build'
description: 'Cache builds to speed up openwrt compilation'
inputs:
  ccache:
    description: 'check if to cache ccache'
    required: false
    default: false
  toolchain:
    description: 'check if to cache toolchain'
    required: false
    default: true
  skip:
    description: 'check if to skip the compilation of toolchain'
    required: false
    default: true
  clean:
    description: 'set to clean cache'
    required: false
    default: false
  prefix:
    description: 'path prefix to openwrt build directory'
    required: false
    defalut: ''
  mixkey:
    description: 'mix a key to identify a cache when you build openwrt for different architecture'
    required: false
    defalut: ''
  skip_saving:
    description: 'skip saving'
    required: false
    defalut: false
outputs:
  hit:
    description: 'indicate cache found'
runs:
  using: 'node20'
  main: 'fetch.js'
  post: 'save.js'
  post-if: 'success()'
branding:
  icon: 'archive'
  color: 'gray-dark'