loooooong nose #1909
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |