{"id":17834796,"url":"https://github.com/animmouse/tool-cache","last_synced_at":"2026-02-07T15:16:35.753Z","repository":{"id":59251076,"uuid":"436654401","full_name":"AnimMouse/tool-cache","owner":"AnimMouse","description":"Implementation of Tool Cache in composite GitHub Actions","archived":false,"fork":false,"pushed_at":"2024-09-18T16:56:00.000Z","size":42,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T09:45:13.216Z","etag":null,"topics":["action","actions","github-actions","tool-cache"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/tool-cache","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnimMouse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-09T14:51:59.000Z","updated_at":"2025-02-17T00:38:08.000Z","dependencies_parsed_at":"2024-01-22T11:34:01.999Z","dependency_job_id":"f245920c-63c1-45f4-9a2e-7b54ef1778b6","html_url":"https://github.com/AnimMouse/tool-cache","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Ftool-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Ftool-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Ftool-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Ftool-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnimMouse","download_url":"https://codeload.github.com/AnimMouse/tool-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244434834,"owners_count":20452268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","actions","github-actions","tool-cache"],"created_at":"2024-10-27T20:11:27.237Z","updated_at":"2026-02-07T15:16:35.747Z","avatar_url":"https://github.com/AnimMouse.png","language":"PowerShell","readme":"# Tool Cache in Composite Action\nImplementation of [actions/tool-cache toolkit](https://github.com/actions/toolkit/tree/main/packages/tool-cache) in composite GitHub Actions.\n\nA Tool Cache for composite-based GitHub Actions.\n\nThis action supports Ubuntu, Windows, and macOS.\n\n## Rationale\nThe purpose of this action is to provide composite-based actions an easy way to install programs on GitHub Actions.\n\nJavaScript-based actions already have [actions/tool-cache toolkit](https://github.com/actions/toolkit/tree/main/packages/tool-cache) to facilitate in installing programs in GitHub Actions.\n\nWith this tool cache action, you don't need to worry writing a code in installing the program and adding it to PATH, you just download the program and extract it to a folder inside runner temp, just like actions/tool-cache toolkit.\n\n## Usage\n1. Create a folder with the name of the program you want to install inside `${{ runner.temp }}`.\n2. Extract all of the files required by the program to that folder inside `${{ runner.temp }}` you have created.\n3. Run this action with the name of the folder inside `${{ runner.temp }}` you used to extract all the files needed for the program.\n\n### Example workflow\n```yaml\nsteps:\n  - name: Download Hello World binary (Unix-like)\n    if: runner.os == 'Linux' || runner.os == 'macOS'\n    working-directory: ${{ runner.temp }}\n    run: |\n      if [ $RUNNER_OS = macOS ]; then os=macos; else os=linux; fi\n      mkdir hello-world\n      wget -O hello-world/hello $GITHUB_SERVER_URL/AnimMouse/Hello-World-Binaries/raw/main/hello-$os\n      chmod +x hello-world/hello\n      \n  - name: Download Hello World binary (Windows)\n    if: runner.os == 'Windows'\n    working-directory: ${{ runner.temp }}\n    run: |\n      New-Item hello-world -ItemType Directory\n      Invoke-WebRequest $env:GITHUB_SERVER_URL/AnimMouse/Hello-World-Binaries/raw/main/hh2.golden.exe -OutFile hello-world\\hello.exe\n      \n  - name: Install the Hello World binary using tool-cache\n    uses: AnimMouse/tool-cache@v1\n    with:\n      folder_name: hello-world\n```\n\n### Example workflow with cache\n```yaml\nsteps:\n  - name: Restore Hello World cache\n    id: cache\n    uses: actions/cache/restore@v4\n    with:\n      path: ${{ runner.tool_cache }}/hello-world\n      key: hello-world-${{ runner.os }}\n      \n  - name: Download Hello World binary (Unix-like)\n    if: (runner.os == 'Linux' || runner.os == 'macOS') \u0026\u0026 ! steps.cache.outputs.cache-hit\n    working-directory: ${{ runner.temp }}\n    run: |\n      if [ $RUNNER_OS = macOS ]; then os=macos; else os=linux; fi\n      mkdir hello-world\n      wget -O hello-world/hello $GITHUB_SERVER_URL/AnimMouse/Hello-World-Binaries/raw/main/hello-$os\n      chmod +x hello-world/hello\n      \n  - name: Download Hello World binary (Windows)\n    if: runner.os == 'Windows' \u0026\u0026 ! steps.cache.outputs.cache-hit\n    working-directory: ${{ runner.temp }}\n    run: |\n      New-Item hello-world -ItemType Directory\n      Invoke-WebRequest $env:GITHUB_SERVER_URL/AnimMouse/Hello-World-Binaries/raw/main/hh2.golden.exe -OutFile hello-world\\hello.exe\n      \n  - name: Install the Hello World binary using tool-cache\n    uses: AnimMouse/tool-cache@v1\n    with:\n      folder_name: hello-world\n      cache_hit: ${{ steps.cache.outputs.cache-hit }}\n      \n  - name: Save Hello World cache\n    if: '! steps.cache.outputs.cache-hit'\n    uses: actions/cache/save@v4\n    with:\n      path: ${{ runner.tool_cache }}/hello-world\n      key: hello-world-${{ runner.os }}\n```\n\nYou can check the .github/workflows/test.yaml file inside this repository to see how it works by installing a Hello World program.\\\nYou can also check actions that uses this tool cache.\n\n### Used by\n1. [AnimMouse/setup-rclone](https://github.com/AnimMouse/setup-rclone)\n2. [AnimMouse/setup-cloudflared](https://github.com/AnimMouse/setup-cloudflared)\n3. [AnimMouse/setup-yt-dlp](https://github.com/AnimMouse/setup-yt-dlp)\n4. [AnimMouse/setup-restic](https://github.com/AnimMouse/setup-restic)\n5. [AnimMouse/setup-youtubeuploader](https://github.com/AnimMouse/setup-youtubeuploader)\n6. [AnimMouse/setup-appimage](https://github.com/AnimMouse/setup-appimage)\n7. [AnimMouse/setup-ffmpeg](https://github.com/AnimMouse/setup-ffmpeg)\n8. [AnimMouse/setup-age](https://github.com/AnimMouse/setup-age)\n9. [AnimMouse/setup-p7zip-fork](https://github.com/AnimMouse/setup-p7zip-fork)\n10. [AnimMouse/setup-mermaid-cli](https://github.com/AnimMouse/setup-mermaid-cli)\n11. [AnimMouse/setup-appimage](https://github.com/AnimMouse/setup-appimage)\n\n### Similar actions\n1. [supplypike/setup-bin](https://github.com/supplypike/setup-bin)\n2. [pbrisbin/setup-tool-action](https://github.com/pbrisbin/setup-tool-action)\n3. [jcwillox/install-tool-action](https://github.com/jcwillox/install-tool-action)\n4. [prantlf/install-release-action](https://github.com/prantlf/install-release-action)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimmouse%2Ftool-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanimmouse%2Ftool-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimmouse%2Ftool-cache/lists"}