From 6d9ddd3e2c30cd52e35c62429df6c670a975321f Mon Sep 17 00:00:00 2001 From: Tom - Henry Coursow Date: Sun, 25 May 2025 14:30:16 +0200 Subject: [PATCH] test --- .gitea/workflows/list_cache.yaml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/list_cache.yaml b/.gitea/workflows/list_cache.yaml index de8dcf5..9f4153d 100644 --- a/.gitea/workflows/list_cache.yaml +++ b/.gitea/workflows/list_cache.yaml @@ -1,24 +1,37 @@ -name: List Runner Tool Cache +name: List Runner Tool Cache (Persistent) on: - workflow_dispatch: # Allows you to manually trigger the workflow from the Gitea UI + push: + branches: + - main + workflow_dispatch: jobs: check-tool-cache: - runs-on: ubuntu-latest # Or whatever runner label you use (e.g., 'linux-amd64') + runs-on: ubuntu-latest # Or your runner label - # Crucial: Set the environment variable for the tool cache path + # 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 # Standard action to get your code + uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v5 # Using v5 for more recent Go versions + uses: actions/setup-go@v5 with: - go-version: '1.21.x' # Install a specific Go version that will be cached + go-version: '1.21.x' - name: List contents of /toolcache run: | @@ -30,7 +43,7 @@ jobs: 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) + - 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"