Skip to content

Commit e253751

Browse files
committed
Update bufbuild GitHub Actions
1 parent fd19e4c commit e253751

14 files changed

+135
-152
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
1818

19-
- name: Setup Buf
20-
uses: bufbuild/[email protected]
21-
with:
22-
github_token: ${{ github.token }}
23-
2419
- name: Push to schema registry
25-
uses: bufbuild/buf-push-[email protected]
20+
uses: bufbuild/[email protected]
2621
with:
27-
buf_token: ${{ secrets.BUF_TOKEN }}
22+
github_token: ${{ github.token }}
23+
token: ${{ secrets.BUF_TOKEN }}
24+
push: true

.github/workflows/create_tag.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ jobs:
5858
token: ${{ github.token }}
5959

6060
- name: Setup Buf
61-
uses: bufbuild/buf-setup-action@v1.30.0
61+
uses: bufbuild/buf-action@v1.2.0
6262
with:
6363
github_token: ${{ github.token }}
64+
token: ${{ secrets.BUF_TOKEN }}
65+
setup_only: true
6466

6567
- name: Push to schema registry
66-
# uses: bufbuild/buf-push-action@v1
67-
# with:
68-
# buf_token: ${{ secrets.BUF_TOKEN }}
68+
env:
69+
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
6970
run: |
70-
export BUF_TOKEN=${{ secrets.BUF_TOKEN }}
7171
buf push --tag ${{ steps.version.outputs.NEW_VERSION }}

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Buf
20-
uses: bufbuild/buf-setup-action@v1.30.0
20+
uses: bufbuild/buf-action@v1.2.0
2121
with:
2222
github_token: ${{ github.token }}
23+
token: ${{ secrets.BUF_TOKEN }}
24+
setup_only: true
2325

2426
- name: Push to schema registry
25-
# uses: bufbuild/buf-push-action@v1
26-
# with:
27-
# buf_token: ${{ secrets.BUF_TOKEN }}
27+
env:
28+
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
2829
run: |
29-
export BUF_TOKEN=${{ secrets.BUF_TOKEN }}
3030
buf push --tag ${{ github.ref_name }}

.github/workflows/pull_request.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: pull-request
22

33
permissions:
44
contents: read
5+
pull-requests: write
56

67
on: pull_request
78
jobs:
@@ -12,17 +13,11 @@ jobs:
1213
- name: Checkout code
1314
uses: actions/checkout@v4
1415

15-
- name: Setup Buf
16-
uses: bufbuild/buf-setup-action@v1.30.0
16+
- name: Buf PR Checks
17+
uses: bufbuild/buf-action@v1.2.0
1718
with:
1819
github_token: ${{ github.token }}
19-
20-
- name: Lint
21-
uses: bufbuild/[email protected]
22-
23-
- name: Push to schema registry
24-
uses: bufbuild/[email protected]
25-
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
26-
with:
27-
buf_token: ${{ secrets.BUF_TOKEN }}
28-
draft: ${{ github.ref_name != 'master'}}
20+
token: ${{ secrets.BUF_TOKEN }}
21+
format: true
22+
lint: true
23+
breaking: true

meshtastic/admin.proto

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ package meshtastic;
55
import "meshtastic/channel.proto";
66
import "meshtastic/config.proto";
77
import "meshtastic/connection_status.proto";
8+
import "meshtastic/device_ui.proto";
89
import "meshtastic/mesh.proto";
910
import "meshtastic/module_config.proto";
10-
import "meshtastic/device_ui.proto";
1111

1212
option csharp_namespace = "Meshtastic.Protobufs";
1313
option go_package = "github.com/meshtastic/go/generated";
@@ -21,7 +21,6 @@ option swift_prefix = "";
2121
* (Prior to 1.2 these operations were done via special ToRadio operations)
2222
*/
2323
message AdminMessage {
24-
2524
/*
2625
* The node generates this key and sends it with any get_x_response packets.
2726
* The client MUST include the same key with any set_x commands. Key expires after 300 seconds.
@@ -529,52 +528,50 @@ message SharedContact {
529528
bool should_ignore = 3;
530529
}
531530

532-
/*
533-
* This message is used by a client to initiate or complete a key verification
534-
*/
531+
/*
532+
* This message is used by a client to initiate or complete a key verification
533+
*/
535534
message KeyVerificationAdmin {
536535
/*
537536
* Three stages of this request.
538537
*/
539538
enum MessageType {
540-
541539
/*
542-
* This is the first stage, where a client initiates
543-
*/
540+
* This is the first stage, where a client initiates
541+
*/
544542
INITIATE_VERIFICATION = 0;
545543

546544
/*
547545
* After the nonce has been returned over the mesh, the client prompts for the security number
548546
* And uses this message to provide it to the node.
549547
*/
550548
PROVIDE_SECURITY_NUMBER = 1;
551-
552-
/*
553-
* Once the user has compared the verification message, this message notifies the node.
554-
*/
549+
550+
/*
551+
* Once the user has compared the verification message, this message notifies the node.
552+
*/
555553
DO_VERIFY = 2;
556554

557-
/*
558-
* This is the cancel path, can be taken at any point
559-
*/
555+
/*
556+
* This is the cancel path, can be taken at any point
557+
*/
560558
DO_NOT_VERIFY = 3;
561-
562559
}
563560

564561
MessageType message_type = 1;
565562

566-
/*
567-
* The nodenum we're requesting
568-
*/
563+
/*
564+
* The nodenum we're requesting
565+
*/
569566
uint32 remote_nodenum = 2;
570567

571-
/*
572-
* The nonce is used to track the connection
573-
*/
568+
/*
569+
* The nonce is used to track the connection
570+
*/
574571
uint64 nonce = 3;
575572

576-
/*
577-
* The 4 digit code generated by the remote node, and communicated outside the mesh
578-
*/
573+
/*
574+
* The 4 digit code generated by the remote node, and communicated outside the mesh
575+
*/
579576
optional uint32 security_number = 4;
580577
}

meshtastic/config.proto

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ message Config {
189189
* Disabling this will disable the SerialConsole by not initilizing the StreamAPI
190190
* Moved to SecurityConfig
191191
*/
192-
bool serial_enabled = 2[deprecated = true];
192+
bool serial_enabled = 2 [deprecated = true];
193193

194194
/*
195195
* For boards without a hard wired button, this is the pin number that will be used
@@ -224,7 +224,7 @@ message Config {
224224
* Clients should then limit available configuration and administrative options inside the user interface
225225
* Moved to SecurityConfig
226226
*/
227-
bool is_managed = 9[deprecated = true];
227+
bool is_managed = 9 [deprecated = true];
228228

229229
/*
230230
* Disables the triple-press of user button to enable or disable GPS
@@ -470,7 +470,7 @@ message Config {
470470
* If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled.
471471
* Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options.
472472
*/
473-
uint64 powermon_enables = 32;
473+
uint64 powermon_enables = 32;
474474
}
475475

476476
/*
@@ -783,7 +783,7 @@ message Config {
783783
* Rotate the compass by 270 degrees and invert.
784784
*/
785785
DEGREES_270_INVERTED = 7;
786-
}
786+
}
787787

788788
/*
789789
* Indicates how to rotate or invert the compass output to accurate display on the display.
@@ -923,7 +923,6 @@ message Config {
923923
* Kazakhstan 863MHz
924924
*/
925925
KZ_863 = 24;
926-
927926
}
928927

929928
/*
@@ -1137,17 +1136,16 @@ message Config {
11371136
}
11381137

11391138
message SecurityConfig {
1140-
1141-
/*
1142-
* The public key of the user's device.
1143-
* Sent out to other nodes on the mesh to allow them to compute a shared secret key.
1144-
*/
1139+
/*
1140+
* The public key of the user's device.
1141+
* Sent out to other nodes on the mesh to allow them to compute a shared secret key.
1142+
*/
11451143
bytes public_key = 1;
11461144

1147-
/*
1148-
* The private key of the device.
1149-
* Used to create a shared key with a remote device.
1150-
*/
1145+
/*
1146+
* The private key of the device.
1147+
* Used to create a shared key with a remote device.
1148+
*/
11511149
bytes private_key = 2;
11521150

11531151
/*

meshtastic/device_ui.proto

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ message DeviceUIConfig {
9090
bool is_clockface_analog = 18;
9191
}
9292

93-
9493
message NodeFilter {
9594
/*
9695
* Filter unknown nodes
@@ -126,7 +125,6 @@ message NodeFilter {
126125
* Filter based on channel
127126
*/
128127
int32 channel = 7;
129-
130128
}
131129

132130
message NodeHighlight {
@@ -154,7 +152,6 @@ message NodeHighlight {
154152
* Highlight nodes by matching name string
155153
*/
156154
string node_name = 5;
157-
158155
}
159156

160157
message GeoPoint {
@@ -163,14 +160,14 @@ message GeoPoint {
163160
*/
164161
int32 zoom = 1;
165162

166-
/*
167-
* Coordinate: latitude
168-
*/
163+
/*
164+
* Coordinate: latitude
165+
*/
169166
int32 latitude = 2;
170167

171-
/*
172-
* Coordinate: longitude
173-
*/
168+
/*
169+
* Coordinate: longitude
170+
*/
174171
int32 longitude = 3;
175172
}
176173

@@ -317,7 +314,7 @@ enum Language {
317314
*/
318315
BULGARIAN = 17;
319316

320-
/*
317+
/*
321318
* Simplified Chinese (experimental)
322319
*/
323320
SIMPLIFIED_CHINESE = 30;
@@ -326,4 +323,4 @@ enum Language {
326323
* Traditional Chinese (experimental)
327324
*/
328325
TRADITIONAL_CHINESE = 31;
329-
}
326+
}

meshtastic/deviceonly.proto

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ syntax = "proto3";
33
package meshtastic;
44

55
import "meshtastic/channel.proto";
6-
import "meshtastic/mesh.proto";
7-
import "meshtastic/telemetry.proto";
86
import "meshtastic/config.proto";
97
import "meshtastic/localonly.proto";
8+
import "meshtastic/mesh.proto";
9+
import "meshtastic/telemetry.proto";
1010
import "nanopb.proto";
1111

1212
option csharp_namespace = "Meshtastic.Protobufs";
@@ -16,7 +16,6 @@ option java_package = "com.geeksville.mesh";
1616
option swift_prefix = "";
1717
option (nanopb_fileopt).include = "<vector>";
1818

19-
2019
/*
2120
* Position with static location information only for NodeDBLite
2221
*/
@@ -269,7 +268,7 @@ message ChannelFile {
269268
/*
270269
* The on-disk backup of the node's preferences
271270
*/
272-
message BackupPreferences {
271+
message BackupPreferences {
273272
/*
274273
* The version of the backup
275274
*/

meshtastic/interdevice.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ option swift_prefix = "";
1212

1313
enum MessageType {
1414
ACK = 0;
15-
COLLECT_INTERVAL = 160; // in ms
16-
BEEP_ON = 161; // duration ms
17-
BEEP_OFF = 162; // cancel prematurely
15+
COLLECT_INTERVAL = 160; // in ms
16+
BEEP_ON = 161; // duration ms
17+
BEEP_OFF = 162; // cancel prematurely
1818
SHUTDOWN = 163;
1919
POWER_ON = 164;
2020
SCD41_TEMP = 176;

0 commit comments

Comments
 (0)