aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nix.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/nix.yml')
-rw-r--r--.github/workflows/nix.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
new file mode 100644
index 0000000..cc8f046
--- /dev/null
+++ b/.github/workflows/nix.yml
@@ -0,0 +1,33 @@
+name: Nix Setup
+
+on:
+ workflow_call:
+ inputs:
+ command:
+ required: false
+ type: string
+ platform:
+ default: "ubuntu"
+ required: false
+ type: string
+ secrets:
+ GH_TOKEN:
+ required: true
+
+jobs:
+ nix:
+ runs-on: "${{ inputs.platform }}-latest"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ token: "${{ secrets.GH_TOKEN }}"
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@main
+
+ - name: Nix Magic Cache
+ uses: DeterminateSystems/magic-nix-cache-action@main
+
+ - name: "Run Input: ${{ inputs.command }}"
+ run: "${{ inputs.command }}"