Skip to content

Commit

Permalink
Make Dist commit conditional on changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wleightond committed Aug 19, 2024
1 parent 93a11b3 commit a86fa37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ jobs:
git config --global user.name "Frontend Github Action"
git config --global user.email "max@thinkst.com"
git add -f dist
git commit --allow-empty -am "Add Frontend Dist"
git push
# Only commit if any files have changed
# git status --porcelain is empty if there are no changes
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Add Frontend Dist"
git push
fi
build:
needs: build-and-commit-frontend-dist
Expand Down

0 comments on commit a86fa37

Please sign in to comment.