-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 977 Bytes
/
docker.yml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build docker container
on:
push:
paths:
- backend/**
- flake.lock
- flake.nix
branches: [ master ]
release:
types: [published]
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'ixhbinphoenix/bne'
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- name: Login to docker
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run nix build and push docker container
run: |
nix build .
docker load -i result
docker push ghcr.io/ixhbinphoenix/bne:latest