Skip to content

Commit

Permalink
Update zephyr-hal.yml to make hal_adi commits more useful
Browse files Browse the repository at this point in the history
With this change, hal_adi commits will have same description and author
information with MSDK commits. Also it does not try to send a commit if
there was no change.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
  • Loading branch information
hfakkiz committed Jan 23, 2025
1 parent 8ac9bcc commit 89c5e45
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/zephyr-hal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,19 @@ jobs:
- name: Push changes to hal_adi repository
run: |
echo "$(pwd) - $(ls)"
echo -e "$(pwd)\n\n$(ls)\n"
cd ./hal_adi
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add *
git commit -m "Update Zephyr MSDK Hal based on MSDK PR: https://github.com/analogdevicesinc/msdk/pull/${PR_NUM}"
git push
if [[ -n $(git status -s) ]]; then
echo "Starting to commit changes to hal_adi repository"
cd ${msdk}
msdk_head=$(git rev-parse HEAD)
commit_author=$(git show --no-patch --format="%an <%ae>" ${msdk_head})
commit_msg=$(git show --no-patch --format="%B" ${msdk_head})
cd ${hal_adi}
git add *
git commit --author="${commit_author}" -m "${commit_msg}"
git push
else
echo "No changes to commit"
fi

0 comments on commit 89c5e45

Please sign in to comment.