Skip to content

Commit 0a646e3

Browse files
committed
build: add submodule pointer change check before committing parent repo
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 2f74112 commit 0a646e3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/wiki.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,17 @@ jobs:
7575
pull: "--rebase --autostash"
7676
push: true
7777

78+
- name: Check submodule pointer changes
79+
id: submodule_status
80+
run: |
81+
if git diff --quiet -- .github/wiki; then
82+
echo "changed=false" >> "$GITHUB_OUTPUT"
83+
else
84+
echo "changed=true" >> "$GITHUB_OUTPUT"
85+
fi
86+
7887
- name: Commit parent repo submodule pointer
79-
if: steps.wiki_commit.outputs.committed == 'true'
88+
if: steps.submodule_status.outputs.changed == 'true'
8089
id: parent_commit
8190
uses: EndBug/add-and-commit@v10
8291
with:

0 commit comments

Comments
 (0)