File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,14 @@ jobs:
1616 - name : Update content and commit
1717 run : |
1818 rm -rf src/content
19- git clone https://github.com/deviceofchoice/blog.git src/content
20- LAST_COMMIT_MSG=$(git -C src/content log --oneline -1 | cut -d' ' -f2-)
21- LAST_AUTHOR_NAME=$(git -C src/content log --format='%an' -1)
22- LAST_AUTHOR_EMAIL=$(git -C src/content log --format='%ae' -1)
19+ git clone --depth=1 https://github.com/deviceofchoice/blog.git src/content
20+ cd src/content
21+ LAST_COMMIT_MSG=$(git log --format='%s' -1)
22+ LAST_AUTHOR_NAME=$(git log --format='%an' -1)
23+ LAST_AUTHOR_EMAIL=$(git log --format='%ae' -1)
24+ cd ..
25+ echo "Commit message: $LAST_COMMIT_MSG"
26+ echo "Author: $LAST_AUTHOR_NAME <$LAST_AUTHOR_EMAIL>"
2327 rm -rf src/content/.git
2428 git config --global user.name "$LAST_AUTHOR_NAME"
2529 git config --global user.email "$LAST_AUTHOR_EMAIL"
You can’t perform that action at this time.
0 commit comments