ci: test #29
Workflow file for this run
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 YAML | |
on: | |
pull_request: | |
branches: [main, dev] | |
types: [opened, synchronize, reopened, labeled] | |
push: | |
branches: [main, dev] | |
workflow_dispatch: | |
jobs: | |
validate-yaml: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read schema.yml and fetch file | |
id: fetch-file | |
run: | | |
CONTENT=$(cat Fastbot/schema.yml) | |
CONFIG_PATH=$(echo "$CONTENT" | jq -r '.config.path') | |
CONFIG_BRANCH=$(echo "$CONTENT" | jq -r '.config.branch') | |
# sudo apt-get install -y jq | |
# CONTENT=$(cat Fastbot/schema.yml) | |
# echo "Path: $CONFIG_PATH" | |
# echo "Branch: $CONFIG_BRANCH" | |
# JSON_FILE_URL="https://raw.githubusercontent.com/$CONFIG_PATH/$CONFIG_BRANCH/schema.json" | |
# curl -sS "$JSON_FILE_URL" > temp.json | |
- uses: InoUno/yaml-ls-check@develop | |
with: | |
root: Fastbot/ | |
schemaMapping: | | |
{ | |
"temp.json": [ "config.yml" ] | |
} |