ci: only run `build` and `lint` workflows once in pull requests

Andrey Nering created

Change summary

.github/workflows/build.yml | 5 ++++-
.github/workflows/lint.yml  | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)

Detailed changes

.github/workflows/build.yml 🔗

@@ -1,5 +1,8 @@
 name: build
-on: [push, pull_request]
+on:
+  push:
+    branches: [main]
+  pull_request:
 
 permissions:
   contents: read