Support Nix environment #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |