mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
Merge branch 'dev' into override-token
This commit is contained in:
35
action.yml
35
action.yml
@@ -7,7 +7,7 @@ inputs:
|
||||
commit_message:
|
||||
description: Commit message, will be ignored if used with same_commit
|
||||
required: false
|
||||
default: 'Prettified Code!'
|
||||
default: "Prettified Code!"
|
||||
same_commit:
|
||||
description: Update the current commit instead of creating a new one
|
||||
required: false
|
||||
@@ -15,14 +15,17 @@ inputs:
|
||||
commit_options:
|
||||
description: Commit options
|
||||
required: false
|
||||
push_options:
|
||||
description: Git push options
|
||||
required: false
|
||||
file_pattern:
|
||||
description: File pattern used for `git add`, can't be used with only_changed!
|
||||
required: false
|
||||
default: '*'
|
||||
default: "*"
|
||||
prettier_options:
|
||||
description: Options for the `prettier` command
|
||||
required: false
|
||||
default: '--write **/*.js'
|
||||
default: "--write **/*.js"
|
||||
dry:
|
||||
description: Running the script in dry mode just shows whether there are files that should be prettified or not
|
||||
required: false
|
||||
@@ -36,7 +39,7 @@ inputs:
|
||||
required: false
|
||||
default: false
|
||||
prettier_plugins:
|
||||
description: Install Prettier plugins, i.e. `@prettier/prettier-php @prettier/some-other-plugin`
|
||||
description: Install Prettier plugins, i.e. `@prettier/plugin-php @prettier/plugin-other`
|
||||
required: false
|
||||
default: ''
|
||||
github_token:
|
||||
@@ -44,10 +47,26 @@ inputs:
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Prettify code!
|
||||
shell: bash
|
||||
run: >-
|
||||
PATH=$(cd $GITHUB_ACTION_PATH; npm bin):$PATH
|
||||
${{ github.action_path }}/entrypoint.sh
|
||||
env:
|
||||
INPUT_COMMIT_MESSAGE: ${{ inputs.commit_message }}
|
||||
INPUT_SAME_COMMIT: ${{ inputs.same_commit }}
|
||||
INPUT_COMMIT_OPTIONS: ${{ inputs.commit_options }}
|
||||
INPUT_FILE_PATTERN: ${{ inputs.file_pattern }}
|
||||
INPUT_PRETTIER_OPTIONS: ${{ inputs.prettier_options }}
|
||||
INPUT_DRY: ${{ inputs.dry }}
|
||||
INPUT_PRETTIER_VERSION: ${{ inputs.prettier_version }}
|
||||
INPUT_ONLY_CHANGED: ${{ inputs.only_changed }}
|
||||
INPUT_PRETTIER_PLUGINS: ${{ inputs.prettier_plugins }}
|
||||
|
||||
branding:
|
||||
icon: 'award'
|
||||
color: 'green'
|
||||
icon: "award"
|
||||
color: "green"
|
||||
|
||||
Reference in New Issue
Block a user