Skip to content

feat: add nix flake #48

feat: add nix flake

feat: add nix flake #48

Workflow file for this run

name: Docker
on:
workflow_call:
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v8
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Docker image
id: image
run: |
nix build -L .#container-${{ matrix.arch }}
[ ! -L result ] && exit 1
echo "path=$(realpath result)" >> "$GITHUB_OUTPUT"
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: container-${{ matrix.arch }}
path: ${{ steps.image.outputs.path }}
if-no-files-found: error
retention-days: 1