-
Notifications
You must be signed in to change notification settings - Fork 20
/
action.yml
37 lines (32 loc) · 1.05 KB
/
action.yml
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
name: Canonical Vale Styles
author: '@evilnick'
description: 'Installs Vale style rules from the Canonical documentation style guide.'
inputs:
vale-config:
description: 'path/to/vale.ini to use'
required: true
default: './vale.ini'
runs:
using: "composite"
steps:
- name: check Vale config
env:
TEMP_DIR: ${{ runner.temp }}
ACTION_DIR: ${{ github.action_path }}
run: |
if ! test -d ./styles/Canonical; then
mkdir -p styles/Canonical
cp $ACTION_DIR/styles/Canonical/* styles/Canonical/
echo "Styles copied to working dir"
fi
if ! test -d ./styles/config/vocabularies/Canonical; then
mkdir -p styles/config/vocabularies/Canonical
cp $ACTION_DIR/styles/config/vocabularies/Canonical/* styles/config/vocabularies/Canonical/
echo "Vocab copied to working dir"
tree styles
fi
if ! test -f ./vale.ini; then
echo "No vale.ini found, using default"
cp $ACTION_DIR/vale.ini .
fi
shell: bash