-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (65 loc) · 2.39 KB
/
firmware-ci.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
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
79
80
81
82
83
84
85
name: Firmware CI
on:
push:
paths:
- 'firmware/**'
workflow_dispatch:
jobs:
linux-build:
runs-on: ubuntu-latest
environment: general
env:
ESP_CONTROLLER_SERVER_PORT: ${{ vars.ESP_CONTROLLER_SERVER_PORT }}
ESP_CONTROLLER_SERVER_HOST: ${{ vars.ESP_CONTROLLER_SERVER_HOST }}
ESP_WIFI_SSID: ${{ vars.ESP_WIFI_SSID }}
ESP_WIFI_PASSWORD: ${{ vars.ESP_WIFI_PASSWORD }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Env File
run: printenv | grep -v "^\(PWD\|SHLVL\|HOME\)" > .env
- name: Install toml
run: pip install toml
- name: Build Firmware Container for Linux
run: ./manage.py build --container firmware
- name: Build Firmware for Linux
run: ./manage.py buildf
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Firmware-linux Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container firmware --op push
- name: Stop and remove containers
if: always()
run: ./manage.py down --container firmware
esp-idf-build:
runs-on: ubuntu-latest
environment: general
env:
ESP_CONTROLLER_SERVER_HOST: ${{ vars.ESP_CONTROLLER_SERVER_HOST }}
ESP_CONTROLLER_SERVER_PORT: ${{ vars.ESP_CONTROLLER_SERVER_PORT }}
ESP_WIFI_SSID: ${{ vars.ESP_WIFI_SSID }}
ESP_WIFI_PASSWORD: ${{ vars.ESP_WIFI_PASSWORD }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Env File
run: printenv | grep -v "^\(PWD\|SHLVL\|HOME\)" > .env
- name: Build ESP-IDF Container
run: ./manage.py build --container esp_idf
- name: Build firmware for ESP32 using ESP-IDF
run: ./manage.py build-esp
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push esp-idf Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container esp_idf --op push
- name: Stop and remove containers
if: always()
run: ./manage.py down --container esp_idf