Skip to content

Commit

Permalink
Merge pull request #213 from AndreasAugustin/fix/empty_ignore_file
Browse files Browse the repository at this point in the history
fix(): fix issue with empty ignore file (#211) 🐛
  • Loading branch information
AndreasAugustin committed Oct 7, 2022
2 parents 523b724 + 6acc4a7 commit 3b2d3fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/push_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
push:
branches:
- main
tags:
- 'v*'
paths-ignore:
- '**/*.md'

Expand Down
4 changes: 3 additions & 1 deletion src/sync_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ echo "::endgroup::"
echo "::group::commit and push changes"
git add .

if [ -r ${TEMPLATE_SYNC_IGNORE_FILE_NAME} ]
# we are checking the ignore file if it exists or is empty
# -s is true if the file contains whitespaces
if [ -s ${TEMPLATE_SYNC_IGNORE_FILE_NAME} ]
then
echo "::debug::unstage files from template sync ignore"
git reset --pathspec-from-file="${TEMPLATE_SYNC_IGNORE_FILE_NAME}"
Expand Down

0 comments on commit 3b2d3fd

Please sign in to comment.