Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Commit ca9fbe6

Browse files
committed
Fix
1 parent 9655608 commit ca9fbe6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/update-submodule.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
run: |
2424
$line = (git submodule status --recursive | Select-Object -First 1).Trim()
2525
$parts = $line -split '\s+'
26+
$oldHash = $parts[0].TrimStart('-', '+', 'U')
2627
$path = $parts[1]
27-
$oldHash = (git -C $path rev-parse HEAD).Trim()
2828
2929
"hash=$oldHash" >> $env:GITHUB_OUTPUT
3030
"path=$path" >> $env:GITHUB_OUTPUT
@@ -42,7 +42,9 @@ jobs:
4242
OLD_HASH: ${{ steps.submodule-old.outputs.hash }}
4343
SUBMODULE_PATH: ${{ steps.submodule-old.outputs.path }}
4444
run: |
45-
$newHash = (git -C $env:SUBMODULE_PATH rev-parse HEAD).Trim()
45+
$line = (git submodule status --recursive | Select-Object -First 1).Trim()
46+
$parts = $line -split '\s+'
47+
$newHash = $parts[0].TrimStart('-', '+', 'U')
4648
4749
$repoUrl = (git -C $env:SUBMODULE_PATH config --get remote.origin.url).Trim()
4850
if ($repoUrl -match '^git@github\.com:(.+)\.git$') {
@@ -74,6 +76,9 @@ jobs:
7476
body: |
7577
Updated [${{ steps.submodule-new.outputs.repoName }}](${{ steps.submodule-new.outputs.repoUrl }}) from ${{ steps.submodule-new.outputs.oldShort }} to ${{ steps.submodule-new.outputs.newShort }}.
7678
79+
- Old commit: [${{ steps.submodule-new.outputs.oldShort }}](${{ steps.submodule-new.outputs.oldCommitUrl }})
80+
- New commit: [${{ steps.submodule-new.outputs.newShort }}](${{ steps.submodule-new.outputs.newCommitUrl }})
81+
7782
[View changes](${{ steps.submodule-new.outputs.compareUrl }})
7883
branch: update-submodules
7984
delete-branch: true

0 commit comments

Comments
 (0)