fix(github_actions): Skip failed boilerplate commit

This ports the change from #3317.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
This commit is contained in:
Lucas Schwiderski 2021-05-06 19:59:30 +02:00
parent 6a3713a090
commit bccaac9b2f
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
1 changed files with 9 additions and 9 deletions

View File

@ -100,15 +100,15 @@ git commit -m "[relevant] $COMMIT_MSG"
mv .git ../doc
cd ../doc
git add --all .
git commit -m "[boilerplate] $COMMIT_MSG"
# Reorder/swap commits, to have "relevant" after "boilerplate".
# This makes it show up earlier in the Github interface etc.
git tag _old
git reset --hard HEAD~2
git cherry-pick _old _old~1
RELEVANT_REV="$(git rev-parse --short HEAD)"
git tag -d _old
if git commit -m "[boilerplate] $COMMIT_MSG"; then
# Reorder/swap commits, to have "relevant" after "boilerplate".
# This makes it show up earlier in the Github interface etc.
git tag _old
git reset --hard HEAD~2
git cherry-pick _old _old~1
RELEVANT_REV="$(git rev-parse --short HEAD)"
git tag -d _old
fi
git checkout "$BRANCH"
OLD_REV="$(git rev-parse --short HEAD)"