generate model for hyperliquid and coinbase #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate and Commit Changes | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # Specify the Python version | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
# Install other dependencies if needed | |
# pip install -r requirements.txt | |
- name: Install asyncapi generator | |
run: npm install -g @asyncapi/generator | |
- name: Run generate.py | |
run: python generate.py | |
- name: Check for changes | |
id: git_diff | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git diff --cached --quiet || echo "changes detected" | |
- name: Commit and push changes | |
if: steps.git_diff.outputs.changes-detected == 'true' | |
run: | | |
git commit -m "chore: update generated files" | |
git push origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |