Files
gitdan-actions/cargo-cache/action.yml
T

27 lines
918 B
YAML

name: 'Cargo CI cache'
description: 'Per-branch layered Cargo target-dir cache for Gitea Actions runners.'
inputs:
cache-root:
description: 'Mount point of the persistent cache volume.'
required: false
default: '/cache'
protected-branches:
description: 'Space-separated branches whose cache dirs are never evicted.'
required: false
default: 'dev main'
outputs:
target-dir:
description: 'Resolved CARGO_TARGET_DIR for this run.'
value: ${{ steps.probe.outputs.target-dir }}
runs:
using: 'composite'
steps:
- id: probe
shell: bash
run: |
echo "PROBE-OK: composite action resolved and executed"
echo " cache-root = ${{ inputs.cache-root }}"
echo " protected-branches= ${{ inputs.protected-branches }}"
echo "target-dir=${{ inputs.cache-root }}/probe" >> "$GITHUB_OUTPUT"
echo "PROBE_ENV_WRITE=ok" >> "$GITHUB_ENV"