.github: add correct changelog

Changelog directory is now located under flatcar scripts, not under
coreos overlay. Fix the location to add correct changelog to the git
commit.

Also use a correct path SDK_OUTER_TOPDIR in cleanup_repo.
This commit is contained in:
Dongsu Park 2023-05-03 12:51:51 +02:00
parent 425473f11d
commit 0902d3cd64

View File

@ -173,12 +173,17 @@ function commit_changes() {
regenerate_manifest "${pkg}" "${new_version}"
pushd "${SDK_OUTER_OVERLAY}"
pushd "${SDK_OUTER_TOPDIR}"
git add "${pkg}"
if [[ -d changelog ]]; then
git add changelog
fi
popd
pushd "${SDK_OUTER_OVERLAY}"
git add "${pkg}"
for dir; do
git add "${dir}"
done
@ -193,7 +198,7 @@ function commit_changes() {
# avoid unwanted changes to be a part of a PR created by the
# peter-evans/create-pull-request action that follows up.
function cleanup_repo() {
git -C "${SDK_OUTER_OVERLAY}" status
git -C "${SDK_OUTER_OVERLAY}" reset --hard HEAD
git -C "${SDK_OUTER_OVERLAY}" clean -ffdx
git -C "${SDK_OUTER_TOPDIR}" status
git -C "${SDK_OUTER_TOPDIR}" reset --hard HEAD
git -C "${SDK_OUTER_TOPDIR}" clean -ffdx
}