feat: Add OCI image with Loom on Python3 (#6) #35
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 | |
- uses: cachix/install-nix-action@v25 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.11 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- run: | | |
nix build \ | |
-L \ | |
-o ./imgBase \ | |
'.#ociImgBase' | |
- run: | | |
nix build \ | |
-L \ | |
-o ./imgGensqlQuery \ | |
'.#ociImgGensqlQuery' | |
- run: | | |
nix build \ | |
-L \ | |
-o ./imgLoom \ | |
'.#ociImgLoom' | |
- name: Login to Docker Hub | |
# only run this when running on main, because | |
# that is the only time we need these creds; | |
# otherwise, Fork-based PRs cannot succeed | |
if: github.ref == 'refs/heads/main' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: push gensql query | |
if: github.ref == 'refs/heads/main' | |
run: | | |
docker load -i ./imgGensqlQuery | |
docker push --all-tags probcomp/gensql.query | |
- name: push loom | |
if: github.ref == 'refs/heads/main' | |
run: | | |
docker load -i ./imgLoom | |
docker push --all-tags probcomp/inferenceql.loom |