-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathaction.yml
More file actions
35 lines (33 loc) · 1015 Bytes
/
Copy pathaction.yml
File metadata and controls
35 lines (33 loc) · 1015 Bytes
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
name: capcut-cli
description: Lint CapCut/JianYing drafts in CI — caption overlaps, line length, cue duration, missing material refs and files.
author: renezander030
branding:
icon: check-square
color: green
inputs:
project:
description: Path to draft_content.json (or its parent directory) to lint.
required: true
args:
description: 'Extra flags passed to `capcut lint` (e.g. "--max-chars 32 --max-cue-secs 6").'
required: false
default: ''
version:
description: capcut-cli version to install from npm.
required: false
default: latest
runs:
using: composite
steps:
- name: Install capcut-cli
shell: bash
env:
VERSION: ${{ inputs.version }}
run: npm install -g "capcut-cli@$VERSION"
- name: Lint draft
shell: bash
env:
PROJECT: ${{ inputs.project }}
ARGS: ${{ inputs.args }}
# `lint` exits 0 (clean) / 1 (warnings) / 2 (errors) — exit 2 fails the job.
run: capcut lint "$PROJECT" $ARGS -H