From c173644ffc0a71a7ccdf5d06633597bd26424c9f Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 10:07:17 +0100 Subject: [PATCH 1/7] fix: submodule update --- .github/workflows/update-submodules.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index c4b35d994b2..c707a928e81 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -13,6 +13,11 @@ jobs: contents: write pull-requests: write steps: + - name: Checkout Repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: true + - name: Git Config run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" @@ -21,6 +26,7 @@ jobs: - name: Update WPT run: | git submodule update --init --recursive + - name: Create Pull Request uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: From c7279696b7e214809bace01116e724a581cab85a Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 10:35:33 +0100 Subject: [PATCH 2/7] fix name of step --- .github/workflows/update-submodules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index c707a928e81..59c841e10dc 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -23,7 +23,7 @@ jobs: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - - name: Update WPT + - name: Update Submodules run: | git submodule update --init --recursive From cf11db1433452a32029cd6d0bf74f1ae92e53eae Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 10:56:06 +0100 Subject: [PATCH 3/7] add check for changes --- .github/workflows/update-submodules.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 59c841e10dc..4aef830908c 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -27,7 +27,25 @@ jobs: run: | git submodule update --init --recursive + + - name: Check for Changes + id: check_changes + run: | + if git diff --quiet; then + echo "no_changes=false" >> "$GITHUB_OUTPUT" + else + echo "no_changes=true" >> "$GITHUB_OUTPUT" + fi + + - name: Create Branch + if: steps.check_changes.outputs.no_changes == 'false' + run: | + git checkout -b submodules-update + git add . + git commit -m "chore: update Submodules" + - name: Create Pull Request + if: steps.check_changes.outputs.no_changes == 'false' uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: base: main From 0f131f9188d7c3f528c6fb87ea06200416890112 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 11:00:15 +0100 Subject: [PATCH 4/7] improve further --- .github/workflows/update-submodules.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 4aef830908c..7fed7faf697 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -14,38 +14,43 @@ jobs: pull-requests: write steps: - name: Checkout Repository + id: checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: true - name: Git Config + id: git-config run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - name: Update Submodules + id: update-submodules run: | git submodule update --init --recursive - name: Check for Changes - id: check_changes + id: check-for-changes run: | if git diff --quiet; then - echo "no_changes=false" >> "$GITHUB_OUTPUT" + echo "change=false" >> "$GITHUB_OUTPUT" else - echo "no_changes=true" >> "$GITHUB_OUTPUT" + echo "change=true" >> "$GITHUB_OUTPUT" fi - name: Create Branch - if: steps.check_changes.outputs.no_changes == 'false' + id: create-branch + if: steps.check-for-changes.outputs.change == 'true' run: | git checkout -b submodules-update git add . git commit -m "chore: update Submodules" - name: Create Pull Request - if: steps.check_changes.outputs.no_changes == 'false' + id: create-pr + if: steps.check-for-changes.outputs.change == 'true' uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: base: main From 8bbba44e9d93272dfa91b91136dc9e53a82f8097 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 11:04:34 +0100 Subject: [PATCH 5/7] how about also pushing? --- .github/workflows/update-submodules.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 7fed7faf697..9cc0120e603 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -47,6 +47,7 @@ jobs: git checkout -b submodules-update git add . git commit -m "chore: update Submodules" + git push --force --set-upstream origin submodules-update - name: Create Pull Request id: create-pr From 522f47d0de7c65108c02a48022aa38959e43fee5 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 11:16:45 +0100 Subject: [PATCH 6/7] what now --- .github/workflows/update-submodules.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 9cc0120e603..d6ead9cc26e 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -30,19 +30,20 @@ jobs: run: | git submodule update --init --recursive - - name: Check for Changes id: check-for-changes run: | if git diff --quiet; then + echo "no changes detected" echo "change=false" >> "$GITHUB_OUTPUT" else + echo "changes detected" echo "change=true" >> "$GITHUB_OUTPUT" fi - name: Create Branch id: create-branch - if: steps.check-for-changes.outputs.change == 'true' + if: ${{ steps.check-for-changes.outputs.change == 'true'}} run: | git checkout -b submodules-update git add . @@ -51,7 +52,7 @@ jobs: - name: Create Pull Request id: create-pr - if: steps.check-for-changes.outputs.change == 'true' + if: ${{ steps.check-for-changes.outputs.change == 'true'}} uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: base: main From dc04431da9d658aacc7918ba24c6005348600568 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 30 Oct 2025 11:31:32 +0100 Subject: [PATCH 7/7] should be this the answer? --- .github/workflows/update-submodules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index d6ead9cc26e..177eb96cd81 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -28,7 +28,7 @@ jobs: - name: Update Submodules id: update-submodules run: | - git submodule update --init --recursive + git submodule update --init --recursive --remote --merge - name: Check for Changes id: check-for-changes