Skip to content

Add EventNet

Add EventNet #23

Workflow file for this run

name: PR checks on algorithm submission
on:
pull_request:
paths:
- 'algorithms/*.yaml'
- '.github/workflows/1-pr-check.yml'
push:
paths:
- 'algorithms/*.yaml'
- '.github/workflows/1-pr-check.yml'
jobs:
check_yaml:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-algo-checks:main
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- uses: actions/checkout@v4
- name: find algorithm files
run: |
{
echo 'FILELIST<<EOF'
find ./algorithms -name '*.yaml' -print
echo EOF
} >> "$GITHUB_ENV"
- name: Convert and validate using jsonschema
run: |
for algo in ${FILELIST}; do
yq -o json $algo > algo.json \
&& jsonschema-cli -i algo.json "config/schema.json"
done
rm algo.json
check_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: find algorithm files
run: |
{
echo 'FILELIST<<EOF'
find ./algorithms -name '*.yaml' -print
echo EOF
} >> "$GITHUB_ENV"
- name: Pull image
run: |
for algo in ${FILELIST}; do
IMAGE=$(grep '^image: ' $algo | sed 's/^image: \+//' | tr -d \'\")
if ! docker pull $IMAGE ; then
echo "Cannot pull image: $IMAGE"
exit 1
fi
done