Skip to content

Support Nix environment #8

Support Nix environment

Support Nix environment #8

Workflow file for this run

name: "Nix build"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE: doldecomp/build-melee:main
steps:
- uses: actions/checkout@v4
- name: Log into container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Grab Melee DOL
run: |
image="$REGISTRY/$IMAGE"
docker pull "$image"
container_id=$(docker create "$image")
docker cp "$container_id":/orig .
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix-build
- run: nix-shell --run "echo OK"