mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
@@ -60,7 +60,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Prettify code
|
- name: Prettify code
|
||||||
uses: creyD/prettier_action@v4.5
|
uses: creyD/prettier_action@v4.6
|
||||||
with:
|
with:
|
||||||
# This part is also where you can pass other options, for example:
|
# This part is also where you can pass other options, for example:
|
||||||
prettier_options: --write **/*.{js,md}
|
prettier_options: --write **/*.{js,md}
|
||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Prettify code
|
- name: Prettify code
|
||||||
uses: creyD/prettier_action@v4.5
|
uses: creyD/prettier_action@v4.6
|
||||||
with:
|
with:
|
||||||
# This part is also where you can pass other options, for example:
|
# This part is also where you can pass other options, for example:
|
||||||
prettier_options: --write **/*.{js,md}
|
prettier_options: --write **/*.{js,md}
|
||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Prettify code
|
- name: Prettify code
|
||||||
uses: creyD/prettier_action@v4.5
|
uses: creyD/prettier_action@v4.6
|
||||||
with:
|
with:
|
||||||
prettier_options: --write **/*.{js,md}
|
prettier_options: --write **/*.{js,md}
|
||||||
only_changed: True
|
only_changed: True
|
||||||
@@ -150,7 +150,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Prettify code
|
- name: Prettify code
|
||||||
uses: creyD/prettier_action@v4.5
|
uses: creyD/prettier_action@v4.6
|
||||||
with:
|
with:
|
||||||
dry: True
|
dry: True
|
||||||
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
|
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ EOF
|
|||||||
# If GIT_IDENTITY="actor"
|
# If GIT_IDENTITY="actor"
|
||||||
if [ "$INPUT_GIT_IDENTITY" = "author" ]; then
|
if [ "$INPUT_GIT_IDENTITY" = "author" ]; then
|
||||||
git config --global user.name "$GITHUB_ACTOR"
|
git config --global user.name "$GITHUB_ACTOR"
|
||||||
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
git config --global user.email "$GITHUB_ACTOR_ID+$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
elif [ "$INPUT_GIT_IDENTITY" = "actions" ]; then
|
elif [ "$INPUT_GIT_IDENTITY" = "actions" ]; then
|
||||||
git config --global user.email "actions@github.com"
|
git config --global user.email "actions@github.com"
|
||||||
git config --global user.name "GitHub Action"
|
git config --global user.name "GitHub Action"
|
||||||
@@ -66,7 +66,7 @@ fi
|
|||||||
PRETTIER_RESULT=0
|
PRETTIER_RESULT=0
|
||||||
echo "Prettifying files..."
|
echo "Prettifying files..."
|
||||||
echo "Files:"
|
echo "Files:"
|
||||||
prettier $INPUT_PRETTIER_OPTIONS \
|
npx prettier $INPUT_PRETTIER_OPTIONS \
|
||||||
|| { PRETTIER_RESULT=$?; echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"; exit 1; } >> $GITHUB_STEP_SUMMARY
|
|| { PRETTIER_RESULT=$?; echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"; exit 1; } >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
echo "Prettier result: $PRETTIER_RESULT"
|
echo "Prettier result: $PRETTIER_RESULT"
|
||||||
|
|||||||
Reference in New Issue
Block a user