-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
41 lines (41 loc) · 1.24 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
name: 'tools shared'
description: 'The tools shared action is used to support static checking capability'
inputs:
checkers: # name of checker
description: 'What checker to use'
required: true
default: 'all'
all:
description: 'Is it necessary to conduct a full repository file check'
default: 'true'
runs:
using: "composite"
steps:
- name: Run all check
if: ${{ inputs.checkers == 'all' }}
run: |
python3 -m pip install requests PyYAML -i https://pypi.org/simple
tools/hab sync
source tools/envsetup.sh
if [ ${{ inputs.all }} == 'true' ]; then
git lynx check --all
else
git lynx check
fi
shell: bash
- name: Run check
if: ${{ inputs.checkers != 'all' }}
run: |
python3 -m pip install requests PyYAML -i https://pypi.org/simple
tools/hab sync
source tools/envsetup.sh
IFS=',' read -ra elements <<< "${{ inputs.checkers }}"
for element in "${elements[@]}"
do
if [ ${{ inputs.all }} == 'true' ]; then
git lynx check --checkers $element --all
else
git lynx check --checkers $element
fi
done
shell: bash