mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-16 21:30:31 +02:00
Another try at bugfixing the ignore mechanism
This commit is contained in:
@@ -60,9 +60,8 @@ echo "Files:"
|
|||||||
prettier $INPUT_PRETTIER_OPTIONS || echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"
|
prettier $INPUT_PRETTIER_OPTIONS || echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"
|
||||||
|
|
||||||
# Ignore node modules and other action created files
|
# Ignore node modules and other action created files
|
||||||
echo "package_lock.json
|
git update-index --skip-worktree package_lock.json
|
||||||
node_modules/
|
git update-index --skip-worktree node_modules/
|
||||||
" >> .gitignore
|
|
||||||
|
|
||||||
# To keep runtime good, just continue if something was changed
|
# To keep runtime good, just continue if something was changed
|
||||||
if _git_changed; then
|
if _git_changed; then
|
||||||
@@ -83,7 +82,6 @@ if _git_changed; then
|
|||||||
# Add changes to git
|
# Add changes to git
|
||||||
git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}"
|
git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}"
|
||||||
fi
|
fi
|
||||||
git rm .gitignore
|
|
||||||
|
|
||||||
# Commit and push changes back
|
# Commit and push changes back
|
||||||
if $INPUT_SAME_COMMIT; then
|
if $INPUT_SAME_COMMIT; then
|
||||||
|
|||||||
Reference in New Issue
Block a user