diff --git a/.github/workflows/push_docker.yml b/.github/workflows/push_docker.yml index 96a4a710..6c35c105 100644 --- a/.github/workflows/push_docker.yml +++ b/.github/workflows/push_docker.yml @@ -7,6 +7,8 @@ on: push: branches: - main + tags: + - 'v*' paths-ignore: - '**/*.md' diff --git a/src/sync_template.sh b/src/sync_template.sh index a898f74f..10e97467 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -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}"