-
Notifications
You must be signed in to change notification settings - Fork 80
28 lines (24 loc) · 1.04 KB
/
lava-schema-check.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
name: Chech LAVA templates
on:
workflow_call:
jobs:
schema-check:
runs-on: ubuntu-latest
container: lavasoftware/lava-server:2024.09
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Schema check
run: |
DEVICE_TYPE="my-device"
BUILD_FILE_NAME="build.tar.gz"
BUILD_DOWNLOAD_URL="https://example.com/downloads/1"
GITHUB_SHA="7e6f96ccf3e911a8a1a18accdbb91991aa0db66e"
find ci/lava/ -name "*.yaml" -exec sed -i "s|{{DEVICE_TYPE}}|${DEVICE_TYPE}|g" '{}' \;
find ci/lava/ -name "*.yaml" -exec sed -i "s|{{GITHUB_SHA}}|${GITHUB_SHA}|g" '{}' \;
find ci/lava/ -name "*.yaml" -exec sed -i "s|{{BUILD_DOWNLOAD_URL}}|${BUILD_DOWNLOAD_URL}|g" '{}' \;
find ci/lava/ -name "*.yaml" -exec sed -i "s|{{BUILD_FILE_NAME}}|${BUILD_FILE_NAME}|g" '{}' \;
find ci/lava/ -name "*.yaml" -exec sed -i "s|{{GITHUB_RUN_ID}}|${GITHUB_RUN_ID}|g" '{}' \;
python3 ci/schemacheck.py ./ci/lava/