Fixup nix configuration for more robust developer experience #6
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: | |
branches: | |
- main | |
jobs: | |
build-and-push-oci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: cachix/install-nix-action@v25 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- run: | | |
nix build \ | |
-L \ | |
--no-link \ | |
'.#bin' | |
- run: | | |
nix build \ | |
-L \ | |
-o ./imgTarball \ | |
'.#ociImg' | |
- if: github.ref == 'refs/heads/main' | |
run: | | |
docker load -i ./imgTarball | |
docker push --all-tags probcomp/inferenceql.query |