diff --git a/.github/workflows/auto-cache/action.yaml b/.github/workflows/auto-cache/action.yaml index 523ce9fe8f..ec929d3de2 100644 --- a/.github/workflows/auto-cache/action.yaml +++ b/.github/workflows/auto-cache/action.yaml @@ -24,9 +24,17 @@ runs: with: path: ${{ inputs.path }} - - name: restore github cache - if: ${{ !contains(runner.name, 'nsc') }} - uses: actions/cache/restore@v3 + - name: setup github cache + if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }} + uses: 'actions/cache@v3' + with: + path: ${{ inputs.path }} + key: ${{ inputs.key }} + restore-keys: ${{ inputs.restore-keys }} + + - name: setup github cache + if: ${{ !contains(runner.name, 'nsc') && inputs.save == 'false' }} + uses: 'actions/cache/restore@v3' with: path: ${{ inputs.path }} key: ${{ inputs.key }} @@ -36,10 +44,3 @@ runs: - id: scons-cache-setup shell: bash run: mkdir -p ${{ inputs.path }} - - - name: save github cache - if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }} - uses: actions/cache/save@v3 - with: - path: ${{ inputs.path }} - key: ${{ inputs.key }}