name: List Runner Tool Cache on: workflow_dispatch: # Allows you to manually trigger the workflow from the Gitea UI jobs: check-tool-cache: runs-on: ubuntu-latest # Or whatever runner label you use (e.g., 'linux-amd64') # Crucial: Set the environment variable for the tool cache path env: RUNNER_TOOL_CACHE: /toolcache steps: - name: Checkout Repository uses: actions/checkout@v3 # Standard action to get your code - name: Setup Go uses: actions/setup-go@v5 # Using v5 for more recent Go versions with: go-version: '1.21.x' # Install a specific Go version that will be cached - 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) 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