{"id":28919295,"url":"https://github.com/ozankasikci/github-actions-local-cache","last_synced_at":"2026-05-15T08:32:26.692Z","repository":{"id":296587141,"uuid":"993875549","full_name":"ozankasikci/github-actions-local-cache","owner":"ozankasikci","description":"A GitHub Action for caching files and folders locally on the runner","archived":false,"fork":false,"pushed_at":"2025-06-12T04:26:48.000Z","size":1642,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T04:27:02.411Z","etag":null,"topics":["actions","cache","github-actions","localhost"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozankasikci.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,"zenodo":null}},"created_at":"2025-05-31T17:57:22.000Z","updated_at":"2025-06-12T04:26:52.000Z","dependencies_parsed_at":"2025-06-12T04:23:43.464Z","dependency_job_id":null,"html_url":"https://github.com/ozankasikci/github-actions-local-cache","commit_stats":null,"previous_names":["ozankasikci/github-actions-local-cache"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/ozankasikci/github-actions-local-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankasikci%2Fgithub-actions-local-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankasikci%2Fgithub-actions-local-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankasikci%2Fgithub-actions-local-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankasikci%2Fgithub-actions-local-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozankasikci","download_url":"https://codeload.github.com/ozankasikci/github-actions-local-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankasikci%2Fgithub-actions-local-cache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261229092,"owners_count":23127554,"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":["actions","cache","github-actions","localhost"],"created_at":"2025-06-22T03:05:53.101Z","updated_at":"2025-10-19T12:18:45.283Z","avatar_url":"https://github.com/ozankasikci.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local Runner Cache\n\n[![CI](https://github.com/ozankasikci/github-actions-local-cache/actions/workflows/ci.yml/badge.svg)](https://github.com/ozankasikci/github-actions-local-cache/actions/workflows/ci.yml)\n[![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen.svg)](https://github.com/ozankasikci/github-actions-local-cache)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.2-blue.svg)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA GitHub Action for caching files and folders locally on the runner to speed up your workflows.\n\n\n## Features\n\n- Cache any files or directories\n- Support for multiple cache paths\n- Flexible cache key generation\n- Cross-platform support\n- Restore fallback keys\n- Integrity verification with SHA-256 checksums\n- Concurrency protection with file locking\n\n## Usage\n\n### Basic Example\n\n```yaml\n- name: Cache dependencies\n  uses: ozankasikci/github-actions-local-cache@v1.7.2  # or @v1 for latest\n  with:\n    path: |\n      ~/.npm\n      node_modules\n    key: ${{ runner.os }}-deps-${{ hashFiles('**/package-lock.json') }}\n    restore-keys: |\n      ${{ runner.os }}-deps-\n```\n\n### Multiple Paths\n\n```yaml\n- name: Cache build artifacts\n  uses: ozankasikci/github-actions-local-cache@v1\n  with:\n    path: |\n      dist\n      build\n      .cache\n      ~/.gradle/caches\n    key: ${{ runner.os }}-build-${{ github.sha }}\n    restore-keys: |\n      ${{ runner.os }}-build-\n      ${{ runner.os }}-\n```\n\n### Advanced Usage\n\n```yaml\n- name: Cache with custom settings\n  uses: ozankasikci/github-actions-local-cache@v1\n  with:\n    path: large-files/\n    key: ${{ runner.os }}-large-${{ hashFiles('**/checksums.txt') }}\n    restore-keys: ${{ runner.os }}-large-\n    upload-chunk-size: 10485760  # 10MB chunks\n    enableCrossOsArchive: true\n    lock-timeout: 120  # Wait up to 2 minutes for locks\n```\n\n## Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `path` | Files, directories, and wildcard patterns to cache | Yes | |\n| `key` | Explicit key for restoring and saving the cache | Yes | |\n| `restore-keys` | Ordered list of keys for restoring stale cache | No | |\n| `upload-chunk-size` | Chunk size for splitting large files (bytes) | No | |\n| `enableCrossOsArchive` | Allow cross-platform cache restore | No | `false` |\n| `cache-dir` | Directory where cache files will be stored | No | `~/.cache/github-actions-local-cache` |\n| `lock-timeout` | Maximum time in seconds to wait for file locks | No | `60` |\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `cache-hit` | Boolean indicating exact match for primary key |\n| `cache-primary-key` | The key used to store the cache |\n| `cache-matched-key` | The key of the cache that was restored |\n\n## Examples by Language\n\n### Node.js\n\n```yaml\n- name: Cache Node.js dependencies\n  uses: ozankasikci/github-actions-local-cache@v1\n  with:\n    path: |\n      ~/.npm\n      node_modules\n    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n    restore-keys: |\n      ${{ runner.os }}-node-\n```\n\n### Python\n\n```yaml\n- name: Cache Python dependencies\n  uses: ozankasikci/github-actions-local-cache@v1\n  with:\n    path: |\n      ~/.cache/pip\n      venv\n    key: ${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }}\n    restore-keys: |\n      ${{ runner.os }}-python-\n```\n\n### Java/Gradle\n\n```yaml\n- name: Cache Gradle dependencies\n  uses: ozankasikci/github-actions-local-cache@v1\n  with:\n    path: |\n      ~/.gradle/caches\n      ~/.gradle/wrapper\n    key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}\n    restore-keys: |\n      ${{ runner.os }}-gradle-\n```\n\n## Important Notes\n\n- **Caches are local to each runner**: Unlike GitHub's cache action, caches are not shared between different runners\n- **No automatic eviction**: Caches persist indefinitely (or until manually cleared)\n- **Path handling**: The action preserves the directory structure when caching:\n  - Absolute paths (e.g., `/path/to/dir`) are archived relative to root and restored to the same location\n  - Relative paths (e.g., `node_modules`) are resolved to absolute paths before caching\n  - This ensures caches work correctly regardless of where they were created\n- **Atomic operations**: Uses lock files and atomic writes to prevent corruption\n- **Integrity checks**: Automatically verifies cache integrity with checksums\n\n## Development\n\n### Release Process\n\n1. Update version in `package.json`\n2. Create and push a git tag: `git tag v1.x.x \u0026\u0026 git push origin v1.x.x`\n3. The GitHub Actions workflow will automatically:\n   - Run tests and linting\n   - Build the action\n   - Create a release branch with built files\n   - Publish the GitHub release\n\nUsers can then reference the action using the tag (e.g., `@v1.7.2`) and get the pre-built files from the release branch.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozankasikci%2Fgithub-actions-local-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozankasikci%2Fgithub-actions-local-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozankasikci%2Fgithub-actions-local-cache/lists"}