Cache Nix derivations on GitHub Actions with Attic.
Find a file
dependabot[bot] 37f74ba5fa
chore(deps): bump pnpm/action-setup from 2 to 3 (#19)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2 to 3.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v2...v3)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-23 03:37:47 -04:00
.github chore(deps): bump pnpm/action-setup from 2 to 3 (#19) 2024-05-23 03:37:47 -04:00
src fix: support nix >= 2.19 (#18) 2024-01-07 22:00:22 +00:00
.gitignore add nixpkgs? 2023-07-19 10:37:21 +08:00
.node-version chore: use Node v20 for nvm/fnm 2023-10-25 23:20:59 +08:00
.prettierignore feat: auto push store paths and add CI (#1) 2023-07-19 09:53:49 +08:00
.prettierrc feat: add release workflow (#2) 2023-07-19 02:51:10 +00:00
action.yml feat!: node18 2023-09-15 15:37:51 +08:00
flake.lock chore: update flake lock 2023-07-21 21:42:33 +08:00
flake.nix chore: misc cleanups for flake and ci (#12) 2023-11-08 14:21:46 +00:00
LICENSE feat: initial commit 2023-07-18 22:17:42 +08:00
package.json feat!: node18 2023-09-15 15:37:51 +08:00
pnpm-lock.yaml feat!: node18 2023-09-15 15:37:51 +08:00
README.md docs: improve README 2023-07-21 16:11:50 +08:00
test.nix chore: misc cleanups for flake and ci (#12) 2023-11-08 14:21:46 +00:00
tsconfig.json feat: add release workflow (#2) 2023-07-19 02:51:10 +00:00

attic-action

Cache Nix derivations with Attic.

Usage

Configure your attic instance with an endpoint, a cache, and a token that can read from and write to the cache. Then, add this step to a workflow job after Nix is installed:

- name: Setup Attic cache
  uses: ryanccn/attic-action@v0
  with:
    endpoint: ${{ secrets.ATTIC_ENDPOINT }}
    cache: ${{ secrets.ATTIC_CACHE }}
    token: ${{ secrets.ATTIC_TOKEN }}

Inputs

endpoint

The Attic endpoint. This is the URL without the cache name.

cache

The name of the Attic cache.

token

The authorization token to provide to Attic (optional).

skip-push

Disable pushing new derivations to the cache automatically at the end of the job (default is false).

This requires you to invoke attic push <cache> with the paths you want to push to the cache manually.

Outputs

None

License

MIT