Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed Dec 9, 2021
1 parent 7da3479 commit 42fe7f6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
- name: Installing platformio
run: pip3 install -U platformio

# - name: Building a firmware for ESP32
# run: |
# export SSID=${{ secrets.WIFI_SSID }}
# export PASS=${{ secrets.WIFI_PASS }}
# export JOINCODE=${{ secrets.HUSARNET_JOINCODE }}
# export HOSTNAME=${{ secrets.HUSARNET_HOSTNAME }}
# pio run
- name: Building a firmware for ESP32
run: |
export SSID=${{ secrets.WIFI_SSID }}
export PASS=${{ secrets.WIFI_PASS }}
export JOINCODE=${{ secrets.HUSARNET_JOINCODE }}
export HOSTNAME=${{ secrets.HUSARNET_HOSTNAME }}
pio run
# - name: Uploading a firmware to ESP32
# run: >
Expand Down
6 changes: 5 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ board_build.partitions = min_spiffs.csv
board_build.embed_txtfiles =
src/index.html


build_flags =
'-DWIFI_SSID="${sysenv.SSID}"'
'-DWIFI_PASS="${sysenv.PASS}"'
'-DHUSARNET_HOSTNAME="${sysenv.HOSTNAME}"'
'-DHUSARNET_JOINCODE="${sysenv.JOINCODE}"'
15 changes: 14 additions & 1 deletion src/simple-webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@

// For local development (rename credenials-template.h and type your WiFi and
// Husarnet credentials there)
#if __has_include("credentials.h")
#include "credentials.h"
#else
// For GitHub Actions

// WiFi credentials
const char *ssid = WIFI_SSID;
const char *password = WIFI_PASS;

// Husarnet credentials
const char *hostName = HUSARNET_HOSTNAME;
const char *husarnetJoinCode = HUSARNET_JOINCODE; // find at app.husarnet.com
const char *dashboardURL = "default";
#endif

#define HTTP_PORT 8080

Expand Down Expand Up @@ -77,7 +90,7 @@ void setup(void) {

// Configure camera
// Tested on M5CAMERA X

esp32cam::Config cfg;

cfg.setPins(esp32cam::pins::M5CameraLED);
Expand Down

0 comments on commit 42fe7f6

Please sign in to comment.