forked from onurbagoren/neurobionicspi
-
Notifications
You must be signed in to change notification settings - Fork 69
78 lines (74 loc) · 2.59 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build
on:
workflow_dispatch:
inputs:
host_name:
description: "Hostname"
default: mbot-master
required: true
user:
description: "Username"
required: true
default: pi
password:
description: "Password"
required: true
default: iloverobots
mwireless_pass:
description: "Get the MWireless Passphrase from: https://bit.ly/30zEzPCRPi"
required: false
email:
description: "Email"
required: true
default: [email protected]
wifi_cc:
description: "WiFi Country Code"
required: true
default: US
wifi_ssid:
description: "Additional WiFi SSID"
required: false
wifi_passphrase:
description: "Additional WiFi Passphrase"
required: false
wpa_ssid:
description: "Access Point SSID"
required: true
default: MBot-AP
wpa_passphrase:
description: "Access Point Passphrase"
required: true
default: iloverobots
env:
PIFILE: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Write env variables
run: |
echo HOSTNAME="${{ github.event.inputs.host_name }}" > $(dirname $PIFILE.Pifile)/.env
echo USER="${{ github.event.inputs.user }}" >> $(dirname $PIFILE.Pifile)/.env
echo USERPASSWORD="${{ github.event.inputs.password }}" >> $(dirname $PIFILE.Pifile)/.env
echo PASSWORD="${{ github.event.inputs.mwireless_pass }}" >> $(dirname $PIFILE.Pifile)/.env
echo WIFI_CC="${{ github.event.inputs.wifi_cc }}" >> $(dirname $PIFILE.Pifile)/.env
echo WIFI_SSID="${{ github.event.inputs.wifi_ssid }}" >> $(dirname $PIFILE.Pifile)/.env
echo WIFI_PASSPHRASE="${{ github.event.inputs.wifi_passphrase }}" >> $(dirname $PIFILE.Pifile)/.env
echo AP_SSID="${{ github.event.inputs.wpa_ssid }}" >> $(dirname $PIFILE.Pifile)/.env
echo AP_PASSPHRASE="${{ github.event.inputs.wpa_passphrase }}" >> $(dirname $PIFILE.Pifile)/.env
echo EMAIL=\"${{ github.event.inputs.email }}\" >> $(dirname $PIFILE.Pifile)/.env
- name: Build image
uses: Nature40/[email protected]
with:
pifile: ${PIFILE}.Pifile
- name: Make tarball
run: |
tar -czvf main.tar.gz main.img
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.workflow }}-${{ github.sha }}.zip
path: main.img