https://github.com/jashandeep-sohi/action-cache-api-shim
This action will let you use other actions/tools that need access to the legacy GHA Cache Service v1 API.
https://github.com/jashandeep-sohi/action-cache-api-shim
actions
Last synced: about 2 months ago
JSON representation
This action will let you use other actions/tools that need access to the legacy GHA Cache Service v1 API.
- Host: GitHub
- URL: https://github.com/jashandeep-sohi/action-cache-api-shim
- Owner: jashandeep-sohi
- License: gpl-3.0
- Created: 2025-01-26T19:42:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-10T17:41:25.000Z (over 1 year ago)
- Last Synced: 2025-02-10T18:34:04.366Z (over 1 year ago)
- Topics: actions
- Language: TypeScript
- Homepage:
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# action-cache-api-shim
This action will let you use other actions/tools that need access to the legacy
GHA Cache Service v1 API.
It does that by running a shim v1 API server that proxies its requests and
responses to/from the new v2 API. The server is launched as a daemon and
`ACTIONS_CACHE_URL` environment variable is updated to its address. Any actions
that follow this one will proxy their requests through the shim.
If v2 Cache API is not available on the runner, this action is effectively a
no-op.
## Usage
```yaml
steps:
- uses: jashandeep-sohi/action-cache-api-shim@v1
# For docker:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
# This is needed so that Buildkit builders can access the server
# from the container environment.
driver-opts: |
network=host
- name: Build Container using Github Actions Cache
uses: docker/build-push-action@v6
with:
push: false
tags: user/app:latest
cache-from: type=gha
cache-to: type=gha,mode=max
# For magic-nix-cache:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run nix build
run: |-
nix build .
```
## Development
Enter the development shell.
If you have `direnv` installed, allow this repo if you haven't already:
```sh
direnv allow
```
Otherwise, you can enter it using:
```sh
nix develop --impure
```
Install dependencies:
```sh
pnpm install
```