Skip to content

Commit aeaaba6

Browse files
committed
Add csharp client to update-clients action
1 parent 8a7c53e commit aeaaba6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/update-clients.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,33 @@ jobs:
104104
gh pr create --fill --draft
105105
env:
106106
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
107+
108+
update-csharp-client:
109+
runs-on: ubuntu-latest
110+
steps:
111+
- name: Checkout Specification Repo
112+
uses: actions/checkout@v2
113+
with:
114+
path: 'DocumentReader-web-openapi'
115+
- name: Checkout C# Client Repo
116+
uses: actions/checkout@v2
117+
with:
118+
repository: 'regulaforensics/DocumentReader-web-csharp-client'
119+
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
120+
path: 'csharp-client'
121+
- name: Update Model According To Specification
122+
working-directory: csharp-client
123+
run: |
124+
./update-models.sh
125+
- name: Push Changes Back To Client Repo
126+
working-directory: csharp-client
127+
run: |
128+
git checkout -b ${GITHUB_SHA::8}
129+
git config --local user.email "action@github.com"
130+
git config --local user.name "GitHub Action"
131+
git add --all
132+
git commit -m "${{ github.event.inputs.title }}" -a
133+
git push --set-upstream origin ${GITHUB_SHA::8}
134+
gh pr create --fill --draft
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

0 commit comments

Comments
 (0)