feat: nix-flake-build
This commit is contained in:
parent
0143401f65
commit
258838514b
2 changed files with 46 additions and 1 deletions
37
.github/workflows/nix-flake-build.yaml
vendored
Normal file
37
.github/workflows/nix-flake-build.yaml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Flake Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runner:
|
||||||
|
default: ubuntu-latest-amd64
|
||||||
|
required: false
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- ubuntu-latest-amd64
|
||||||
|
- ubuntu-latest-arm64
|
||||||
|
|
||||||
|
package:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: "${{ inputs.runner }}"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install Nix
|
||||||
|
uses: https://github.com/DeterminateSystems/nix-installer-action@v4
|
||||||
|
with:
|
||||||
|
init: none
|
||||||
|
planner: linux
|
||||||
|
github-token: null
|
||||||
|
- name: Setup Attic
|
||||||
|
uses: https://github.com/ryanccn/attic-action@v0
|
||||||
|
with:
|
||||||
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||||
|
cache: ${{ secrets.ATTIC_CACHE }}
|
||||||
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
- run: nix build ".#${{ inputs.package }}"
|
10
.github/workflows/nix-flake-check.yaml
vendored
10
.github/workflows/nix-flake-check.yaml
vendored
|
@ -2,10 +2,18 @@ name: Flake Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runner:
|
||||||
|
default: ubuntu-latest-amd64
|
||||||
|
required: false
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- ubuntu-latest-amd64
|
||||||
|
- ubuntu-latest-arm64
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest-amd64
|
runs-on: "${{ inputs.runner }}"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
|
|
Loading…
Reference in a new issue