mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 09:34:11 +02:00
Github action to use an Attic binary cache
https://cachix.org
- TypeScript 67.8%
- Nix 26.9%
- JavaScript 5.3%
| .github/workflows | ||
| __tests__ | ||
| lib | ||
| src | ||
| .gitignore | ||
| action.yml | ||
| jest.config.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| test.nix | ||
| tsconfig.json | ||
| yarn.lock | ||
cachix-action
Build software only once using Nix with the help of Cachix.
Usage
-
Login to Cachix and create a new cache. Backup the signing key in the process.
-
As an admin of your github repository:
- Click on Settings
- Click on Secrets (If missing, you need to sign up first for actions beta)
- Add your signing key value under name
CACHIX_SIGNING_KEY.
-
Create
.github/workflows/test.ymlin your repo with the following contents:
name: "Test"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: cachix/install-nix-action@v2
- uses: cachix/cachix-action@v1
with:
name: cachix-action
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# Only needed for private caches
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
See action.yml for all options.
Hacking
Install the dependencies
$ yarn install
Build the typescript
$ yarn build
Run the tests ✔️
$ yarn test