Fix doxygen error when there are no changes to commit (#232)

Previously the script worked when there were changes and
generates an error when there's actually nothing to do
because "git commit" returns exit code 1 when there's nothing to do.

This updates the github workflow to only commit when there's something
to commit.  For more discussion see
https://stackoverflow.com/questions/5139290/how-to-check-if-theres-nothing-to-be-committed-in-the-current-branch

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
This commit is contained in:
Dave Thaler 2021-05-27 14:28:28 -07:00 коммит произвёл GitHub
Родитель 4c64214af7
Коммит f79e91422e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 0 удалений

2
.github/workflows/update-docs.yml поставляемый
Просмотреть файл

@ -42,6 +42,8 @@ jobs:
doxygen
cd docs/html
git add .
if [ -n "$(git status --porcelain)" ]; then
git commit -s -m "Updated documentation"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/microsoft/ebpf-for-windows.git
git push
fi