name: List Runner Tool Cache (Persistent) on: push: branches: - main workflow_dispatch: jobs: check-tool-cache: runs-on: ubuntu-latest # Or your runner label # Define the container that runs your steps container: image: ubuntu-latest # A common image used with act-runner, or your custom image volumes: # Map the persistent 'act-toolcache' Docker volume from your host # to the /toolcache path inside this job container. # This makes the /toolcache directory persistent. - act-toolcache:/toolcache env: # This variable now tells nektos/act to use the path where the persistent # volume is mounted. RUNNER_TOOL_CACHE: /toolcache steps: - name: Checkout Repository uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.21.x' - name: List contents of /toolcache run: | echo "--- Listing contents of /toolcache ---" ls -F /toolcache || echo "/toolcache does not exist or is empty" - name: List contents of /toolcache/go run: | echo "--- Listing contents of /toolcache/go ---" ls -F /toolcache/go || echo "/toolcache/go does not exist or is empty" - name: List contents of /opt/hostedtoolcache (for comparison - will likely be empty if not explicitly mounted here) run: | echo "--- Listing contents of /opt/hostedtoolcache (for comparison) ---" ls -F /opt/hostedtoolcache || echo "/opt/hostedtoolcache does not exist or is empty" - name: Verify Go installation (optional) run: | echo "--- Verifying Go installation ---" go version