-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
42 lines (39 loc) · 1.42 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
37
38
39
40
41
42
name: 'Rasa NLU Target Files'
description: 'A GitHub action to put Rasa NLU data in prescribed target files'
inputs:
target_files_config:
description: YAML file containing NLU target files config.
required: false
default: target_files.yml
update_config_file:
description: Also update (rewrite) the `target_files_config` file with any new items found. New items will explicitly be assigned to the default file for their section. Specify `true` to use.
required: false
branding:
icon: 'message-square'
color: 'blue'
runs:
using: "composite"
steps:
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install -r "${{ github.action_path }}"/requirements.txt
shell: bash
- name: Set boolean options
id: bool_opts
run: |
case "$(tr "[:upper:]" "[:lower:]" <<< "${{ inputs.update_config_file }}")" in
"true") echo "::set-output name=update_config_file::--update_config_file" ;;
*) echo "::set-output name=update_config_file::";;
esac
shell: bash
- name: Run Result Comparison
shell: bash
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.action_path }}
python -m nlu_target_files enforce \
--target_files_config ${{ inputs.target_files_config }} \
${{ steps.bool_opts.outputs.update_config_file }}