From 959479e812ea262eb58ca8663024e42ac5ac0d5b Mon Sep 17 00:00:00 2001 From: cmdoret Date: Thu, 24 Oct 2024 15:43:12 +0200 Subject: [PATCH] ci: pr check workflow --- .github/workflows/pr-check.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c417f06..5bddf0e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,4 +1,4 @@ -name: PR checks +name: PR checks for algorithm submission on: pull_request: @@ -6,4 +6,26 @@ on: - 'algorithms/*.yaml' env: + IMAGE_NAME: ${{ github.repository }}-evaluator + +jobs: + + check_yaml: + container: + image: ghcr.io/${{ env.IMAGE_NAME }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + + - name: Convert yaml + run: yq -o json FILE.yaml > FILE.json + + - name: Validate jsonschema + run: jsonschema-cli -i FILE.json SCHEMA.json + + check_image: + steps: + - name: Pull image + run: docker pull $(sed 's/^image: \(.*\)$' FILE.yaml)