Skip to content

update api/manager.yaml #39

update api/manager.yaml

update api/manager.yaml #39

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
permissions:
contents: write
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"
token: ${{ secrets.GH_PAT }}
# # step 3: Patch middleware api specification
# - name: Apply patch to middleware.yaml
# run: git apply ./patches/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