Skip to content

clean up some checks (#87) #91

clean up some checks (#87)

clean up some checks (#87) #91

name: Validate & build index
on:
push:
branches:
- master
paths-ignore:
- 'mappings/index.json'
workflow_dispatch:
jobs:
servers:
runs-on: ubuntu-latest
steps:
# Prepare the working dir
- name: Clear any existing files
run: rm -rf *
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
# Install Python
- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Python dependencies
run: pip install -r mappings/scripts/requirements.txt
# Validate servers
- name: Validate Servers
run: |
cd mappings
python scripts/validate.py --servers_dir servers --metadata_schema metadata.schema.json --inactive_file inactive.json --inactive_schema inactive.schema.json
env:
PR_ID: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_ARGS: "true"
# Build index
- name: Delete the old index
run: rm -f mappings/index.json
- name: Build Index
run: |
cd mappings
python scripts/create_index.py --servers_dir servers --inactive_file inactive.json --index_output index.json
- name: Commit index
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Updated the servers index