automation: Synchronize main to earlgrey-hwe

The first attempt was incomplete as it neglected to check out the target
branch and perform a merge before creating the PR.

Signed-off-by: Chris Frantz <cfrantz@google.com>
diff --git a/.github/workflows/sync-main-to-earlgrey-hwe.yml b/.github/workflows/sync-main-to-earlgrey-hwe.yml
index 1ba6c68..16c2e0e 100644
--- a/.github/workflows/sync-main-to-earlgrey-hwe.yml
+++ b/.github/workflows/sync-main-to-earlgrey-hwe.yml
@@ -10,11 +10,23 @@
   create-pull-request:
     runs-on: ubuntu-latest
     steps:
-      - name: Checkout code
+      - name: Checkout the earlgrey-hwe branch
         uses: actions/checkout@v4
         with:
+          ref: earlgrey-hwe
           fetch-depth: 0 # Fetches all history so branches can be compared
 
+      - name: Merge main into earlgrey-hwe
+        run: |
+          git config --global user.name 'synchronize-bot[bot]'
+          git config --global user.email 'synchronize[bot]@users.noreply.github.com'
+
+          # Fetch the latest main branch
+          git fetch origin main:main
+
+          # Merge main into the currently checked-out dev branch
+          git merge main --no-edit
+
       - name: Generate GitHub App Token
         id: generate-token
         uses: actions/create-github-app-token@v1