Skip to content

Commit

Permalink
Feature/11 add workflow to update sdk (#12)
Browse files Browse the repository at this point in the history
* add workflow to update sdk, add json generator

* update content-generation, fix analysis, add patch for middleware

* add apply patch to workflow

* add test to workflow

* workflow triggered only for updates in api folder

* build of sdk moved to sdk repo

* fix indentation, typo
  • Loading branch information
ossaleon authored Jun 1, 2024
1 parent e1d351c commit 26c3f63
Show file tree
Hide file tree
Showing 4 changed files with 866 additions and 789 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/update_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update SDK

# Define the events that trigger the workflow
on:
push:
branches:
- main
paths:
- "api/**"

jobs:
update_api:
# Define the OS and environment the job will run on
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the first repository
- name: Checkout repository
uses: actions/checkout@v4

# Step 2: Checkout the second repository
- name: Checkout second repository
uses: actions/checkout@v4
with:
repository: wordlift/python-client
path: "./python-client"

# step 3: Patch middleware api specification
- name: Apply patch to middleware.yaml
run: git apply ./patch/fix_middleware_spec.patch

- name: Copy content from current repo to another repo
run: cp api/* python-client/api

# Step 4: Commit and push the changes to the repository
- name: Commit and push changes
run: |
cd python-client
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Update api"
git push origin main
Loading

0 comments on commit 26c3f63

Please sign in to comment.