diff --git a/entrypoint.sh b/entrypoint.sh index 16a4b42..6ed784c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -59,6 +59,12 @@ echo "Prettifing files..." echo "Files:" prettier $INPUT_PRETTIER_OPTIONS || echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS" +# Ignore node modules and other action created files +echo "package_lock.json +node_modules/ +" >> .gitignore +git update-index --assume-unchanged .gitignore + # To keep runtime good, just continue if something was changed if _git_changed; then if $INPUT_DRY; then @@ -68,13 +74,6 @@ if _git_changed; then # Calling method to configure the git environemnt _git_setup - # Ignore node modules and other action created files - echo "package_lock.json - node_modules/ - .gitignore - " >> .gitignore - git update-index --skip-worktree .gitignore - if $INPUT_ONLY_CHANGED; then # --diff-filter=d excludes deleted files for file in $(git diff --name-only --diff-filter=d HEAD^..HEAD)