-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1.27 KB
/
update_client.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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