-
Notifications
You must be signed in to change notification settings - Fork 24
44 lines (36 loc) · 1.63 KB
/
validate_dockstore_yaml.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
43
44
name: validate-dockstore-yaml
on: push
jobs:
publish-test:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Cache node_modules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dockstore cli
run: |
mkdir -p ~/bin
curl -L -o ~/bin/dockstore https://github.com/dockstore/dockstore-cli/releases/download/1.14.0/dockstore
chmod +x ~/bin/dockstore
export PATH=~/bin:$PATH
mkdir -p ~/.dockstore
printf "token: 19dd4c1120940ea0f604cc856826d58eae108eeb72b8bb6186a8ce0e60b96637\nserver-url: https://dockstore.org/api\n" > ~/.dockstore/config
dockstore --version
- name: Validate dockstore.yml
run: |
export PATH=~/bin:$PATH
validation_output=$(dockstore yaml validate --path .)
echo "$validation_output"
if [[ $validation_output == *"Your .dockstore.yml has the following errors"* || $validation_output == *"Your .dockstore.yml is invalid"* ]]; then
echo "Dockstore validation failed."
exit 1
fi