add action for cachix deploy

This commit is contained in:
zowoq 2023-07-20 10:23:09 +10:00
parent d183c2edbf
commit 8416a0fa2b

31
.github/workflows/cachix.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: "cachix"
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: "cachix"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
accept-flake-config = true
experimental-features = nix-command flakes
- name: Build Spec
run: |
nix build .#cachix-deploy-spec
- name: Deploy
env:
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
run: |
nix run --inputs-from .# nixpkgs#cachix -- deploy activate ./result