Skip to content

Regenerate Python library snippets #14

Regenerate Python library snippets

Regenerate Python library snippets #14

name: Regenerate Python library snippets
on:
workflow_dispatch:
repository_dispatch:
jobs:
generate_snippets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
pip install jinja2
- name: Delete folder
run: |
rm -rf meraki/sdk/python
- name: Download newest generator
run: |
wget https://github.com/meraki/dashboard-api-python/raw/main/generator/generate_snippets.py
- name: Regenerate Python Library snippets
run: |
python generate_snippets.py
- name: Move snippets
run: |
mv code_snippets meraki/sdk/python
- name: Delete generator
run: |
rm generate_snippets.py
- name: Commit changes to new branch
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Action
author_email: [email protected]
message: Automatically regenerated Python library snippets.