From 3c5e4de9b273fd8cfbc57e26afc617a15713f3a6 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 21 Jul 2023 16:11:50 +0800 Subject: [PATCH] docs: improve README --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d642528..309095b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,44 @@ # attic-action -Cache Nix derivations with [attic](https://github.com/zhaofengli/attic). +Cache Nix derivations with [Attic](https://github.com/zhaofengli/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: + +```yaml +- 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 ` with the paths you want to push to the cache manually. + +## Outputs + +None + +## License + +MIT