-
Notifications
You must be signed in to change notification settings - Fork 11
/
action.yml
26 lines (26 loc) · 851 Bytes
/
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
inputs:
working-directory:
description: 'Working directory where package.json can be found'
default: '.'
runs:
using: "composite"
steps:
- name: Extract contributed themes from package.json
uses: ./.github/actions/jq-action-master
id: themes
with:
cmd: 'jq .contributes.themes[].path ${{ inputs.working-directory }}/package.json --raw-output'
multiline: true
- name: Verify each contributed theme exists
shell: bash
run: |
errors=0
themes_in_package_json="${{ steps.themes.outputs.value }}"
for theme in $themes_in_package_json; do
filepath="${{ inputs.working-directory }}/$theme"
if (!(test -f "$filepath")); then
echo "ERROR: File not found: $filepath"
errors+=1
fi
done
exit $errors