aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorrubiigen <alyxwren@proton.me>2024-02-02 18:29:45 +0000
committerFrankie B <frankieraybrown@gmail.com>2024-02-02 18:39:57 +0000
commitd666f30475528ce7f50cc3dd92a1693241083fe8 (patch)
tree5b443f79a7100f2db735853335df81d9a7b95cc3 /.github/workflows
parentea3485f5c5dac7f89562db741bf981b2b743d01c (diff)
major refactor (treewide amongst general cleaning based on my modified dots (with help from notashelf) - perks 1: it works
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/check.yml23
-rw-r--r--.github/workflows/nix.yml33
2 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
new file mode 100644
index 0000000..e7560e6
--- /dev/null
+++ b/.github/workflows/check.yml
@@ -0,0 +1,23 @@
+name: Check Flake
+
+on:
+ workflow_dispatch:
+ pull_request:
+ paths:
+ - "**.nix"
+ - "**.lock"
+ - ".github/workflows/check.yml"
+ push:
+ paths:
+ - "**.nix"
+ - "**.lock"
+ - ".github/workflows/check.yml"
+
+jobs:
+ check:
+ # uses the local reusable workflow
+ uses: ./.github/workflows/nix.yml
+ secrets:
+ GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ with:
+ command: nix flake check --accept-flake-config
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 }}"