summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: b983ab907a5fb2491b5eb00621c265db531ac62f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: 'Build'
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  build:
    permissions: write-all
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: cachix/install-nix-action@v20
    - uses: DeterminateSystems/magic-nix-cache-action@v2
    - run: nix build -L .#docker
    - run: nix develop -L -c dune runtest
    - name: Log in to the Container registry
      uses: docker/login-action@v3
      with:
        registry: ghcr.io
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    - run: docker load < result
    - run: docker push ghcr.io/molvrr/combattant:latest