Skip to content

Network Edge Events Published #14

Network Edge Events Published

Network Edge Events Published #14

name: Synchronize Repo with Data Schemas
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'jsonschema/**'
- 'scripts/**'
- '.github/workflows/sync_data_schema_updates.yaml'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Set git user and generate files
run: |
git config --global user.name 'equinix-labs@auto-commit-workflow'
git config --global user.email '[email protected]'
git config advice.addIgnoredFile false
git fetch
echo -e "\nThis is executing for branch: ${GITHUB_HEAD_REF##*/}."
git checkout ${GITHUB_HEAD_REF##*/}
- name: Update Data Loaders
run: python3 ./scripts/update_data_loader.py
- name: Update JSON Catalog
run: python3 ./scripts/generate_json_catalog.py
- name: Update README.md
run: python3 ./scripts/generate_readme_event_catalog.py
- name: Auto Commit Updates
run: |
git add .
echo -e "\nGit status:"
echo `git status`
cdate=`date`
cmsg="Auto commit generated client synchronization changes for Data Schema Updates - $cdate"
echo -e "\nCommit message created : $cmsg"
echo -e "\nCommitting if there are files to update in client dir:"
echo `git commit -m "$cmsg"`
echo `git push`