diff --git a/.github/workflows/rebase-on-push-to-main-branch.yaml b/.github/workflows/rebase-on-push-to-main-branch.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..38ced832876efa46ee96b2f9f47540fb574ed363
--- /dev/null
+++ b/.github/workflows/rebase-on-push-to-main-branch.yaml
@@ -0,0 +1,17 @@
+---
+name: Rebase on push to main branch
+"on":
+  push:
+    branches: [main]
+jobs:
+  rebase:
+    name: Rebase on push to main branch
+    runs-on: ubuntu-latest
+    steps:
+      - name: Rebase all pull requests on push to the main branch
+        uses: peter-evans/rebase@v3
+        with:
+          base: main
+          exclude-drafts: true
+          exclude-labels: |
+            no-rebase