Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for update api spec files to main #73

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Update Data Branch"

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0,3" # every sunday and wednesday at midnight

jobs:
update-data:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout docs-data branch"
uses: "actions/checkout@v4"
with:
ref: docs-data

- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"

- name: "List requirements"
run: |
cat requirements_ubuntu.txt
cat requirements_python.txt

- name: "Install System dependencies"
run: |
sudo apt -y install $(tr '\n' ' ' < requirements_ubuntu.txt)

- name: "Install Python dependencies"
run: |
pip install --upgrade pip
pip install -r requirements_python.txt

- name: "Generate, commit and push updated openapi json files to 'docs-data' branch"
run: |
git config user.name github-actions
git config user.email [email protected]
./update-data.sh