Skip to content

Commit c81e563

Browse files
authored
Merge pull request #32 from groundlight/credentials-refactor-fix
updated workflows to fix issues exposed by credentials-refactor merge
2 parents e8d1330 + 46c85a6 commit c81e563

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

.github/workflows/make_binaries.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: PlatformIO CI
22

33
on:
44
push:
5-
branches:
6-
- main
75

86
jobs:
97
build:
@@ -23,9 +21,19 @@ jobs:
2321
- name: Install PlatformIO Core
2422
run: pip install --upgrade platformio
2523

24+
- name: Create credentials.h for build
25+
run: cp src/credentials_template.h src/credentials.h
26+
2627
- name: Build PlatformIO Project
2728
run: pio run
2829

30+
31+
deploy_release:
32+
if: github.ref == 'refs/heads/main'
33+
runs-on: ubuntu-latest
34+
needs: build
35+
steps:
36+
2937
- name: Copy binaries to /firmware
3038
run: bash copy_firmware.sh
3139

src/credentials_template.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* template file for preloading credentials instead of reading from the file system
55
* only applicable for [env:demo-unit-preloaded]
66
*
7-
* to use this file, copy this template to "credentials.h" and fill in the applicable values.
7+
* to use this file, copy this template to "credentials.h" and uncomment/fill in the applicable values.
88
* the list below is non-exhaustive and additional options can be added as needed.
99
* this will override anything in the file system on every startup.
1010
*/
@@ -13,17 +13,20 @@
1313
void set_preferences(Preferences preferences);
1414

1515
void set_preferences(Preferences preferences) {
16-
// A non-exhaustive list of preferences for the ESP32
16+
1717
preferences.begin("config");
18-
preferences.putString("ssid", "");
19-
preferences.putString("password", "");
20-
preferences.putString("det_id", "");
21-
preferences.putString("api_key", "");
22-
preferences.putInt("query_delay", 600);
18+
19+
// A non-exhaustive list of preferences for the ESP32
20+
// preferences.putString("ssid", "");
21+
// preferences.putString("password", "");
22+
// preferences.putString("det_id", "");
23+
// preferences.putString("api_key", "");
24+
// preferences.putInt("query_delay", 600);
2325
// preferences.putString("email", "");
2426
// preferences.putString("emailEndpoint", "");
2527
// preferences.putString("emailKey", "");
2628
// preferences.putString("emailHost", "");
29+
2730
preferences.end();
2831
}
2932

0 commit comments

Comments
 (0)