-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yaml
39 lines (39 loc) · 1.06 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Format code
description: Format code
inputs:
github_token:
description: 'GitHub Access Token'
required: false
default: ${{ github.token }}
command:
description: 'command to format code'
required: true
commit_message:
description: 'commit message'
required: true
working_directory:
description: working directory
required: false
default: ""
skip_push:
required: false
description: If "true", this action skips pushing a commit
default: false
branch:
required: false
description: branch where a commit is pushed
default: ""
runs:
using: composite
steps:
- run: bash "$GITHUB_ACTION_PATH/main.sh"
working-directory: ${{ inputs.working_directory }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
SKIP_PUSH: ${{ inputs.skip_push }}
ROOT_DIR: ${{ github.workspace }}
INPUT_COMMAND: ${{ inputs.command }}
INPUT_COMMIT_MESSAGE: ${{ inputs.commit_message }}
EVENT_NAME: ${{ github.event_name }}
BRANCH: ${{ inputs.branch }}