-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.11 KB
/
build-docker-containers.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
name: Build docker containers
on:
push:
branches:
- master
env:
CACHIX_CACHE: capack
jobs:
build-packages:
name: Build docker containers
runs-on: ubuntu-latest
steps:
- name: Install Nix
run: |
curl -L https://nixos.org/nix/install | sh
source ~/.nix-profile/etc/profile.d/nix.sh
nix --version
- name: Set up cachix
run: |
source ~/.nix-profile/etc/profile.d/nix.sh
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix --version
cachix use ${CACHIX_CACHE}
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker containers
run: |
source ~/.nix-profile/etc/profile.d/nix.sh
nix-build https://github.com/oar-team/nur-kapack/archive/master.tar.gz -A batsim-docker-master -o ./container-tarball
docker load -i ./container-tarball
docker push oarteam/batsim:latest