Merge pull request #56 from alberto-abarzua/feat/update_docs #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |