-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (39 loc) · 1.24 KB
/
devnet.yaml
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
43
44
45
46
47
48
name: Devent Container Build
on:
workflow_dispatch:
inputs:
tag:
description: 'Docker tag for the images'
required: false
default: 'latest'
variant:
description: 'Devnet variant'
required: false
default: 'container-default'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup SSH config
run: |
mkdir -p ~/.ssh && chmod 700 ~/.ssh
echo "${{ secrets.REMOTE_NIX_BUILDER_SSH }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
cat <<EOF > ~/.ssh/config
Host nixremotebuilderamd64
"{{ secrets.REMOTE_NIX_BUILDER_HOST_AMD64 }}"
Host nixremotebuilderarm64
"{{ secrets.REMOTE_NIX_BUILDER_HOST_ARM64 }}"
EOF
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_PAT }}" | docker login -u "${{ secrets.DOCKERHUB_USER }}" --password-stdin
- name: Nix build
run: ./build_and_load_docker_images.sh
env:
TAG: ${{ github.event.inputs.tag }}
VARIANT: ${{ github.event.inputs.variant }}