Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Submit a request
url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
about: Submit any requests to Regula Support Team
4 changes: 4 additions & 0 deletions .github/workflows/make-prs-for-client-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,31 @@ jobs:
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-python-client
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

java-webclient-pr:
runs-on: ubuntu-latest
steps:
- name: Create PR for Java WebClient Repo
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-java-client
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

js-webclient-pr:
runs-on: ubuntu-latest
steps:
- name: Create PR for JS WebClient Repo
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-js-client
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

csharp-webclient-pr:
runs-on: ubuntu-latest
steps:
- name: Create PR for CSharp WebClient Repo
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-csharp-client
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

openapi-pr:
runs-on: ubuntu-latest
steps:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/release-web-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,21 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Specifications
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'master-branch'
- name: Install redoc-cli
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Build html page
working-directory: master-branch
run: |
npm install -g redoc-cli;
npx redoc-cli build "./index.yml" --output doc.html \
--options.maxDisplayedEnumValues=5 --options.theme.logo.gutter="20px" \
--options.theme.colors.primary.main="#8a53cb" --options.expandResponses="all" \
--options.expandSingleSchemaField --options.hideDownloadButton \
--options.jsonSampleExpandLevel="6";
npm install -g @redocly/cli;
npx @redocly/cli build-docs index.yml -o=doc.html;
- name: Checkout pages branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: 'pages-branch'
ref: 'gh-pages'
Expand Down
169 changes: 128 additions & 41 deletions .github/workflows/update-clients.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,177 @@
name: update clients

on:
workflow_dispatch:
inputs:
title:
description: "Title for PR's"
required: true
push:
branches: [develop]
workflow_dispatch:
inputs:
title:
description: "Title For PR's"
required: true
branch:
description: "OpenAPI branch"
required: true
default: "develop"

jobs:
title:
runs-on: ubuntu-latest
outputs:
title: ${{ steps.get-title.outputs.fmt_title }}
steps:
- id: get-title
run: |
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "fmt_title=${{ github.event.inputs.title }}" >> "$GITHUB_OUTPUT"
else
echo "fmt_title=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
fi

update-js-client:
needs: title
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'FaceSDK-web-openapi'
path: "FaceSDK-web-openapi"
ref: ${{ github.event.inputs.branch }}

- name: Checkout JS Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/FaceSDK-web-js-client'
repository: "regulaforensics/FaceSDK-web-js-client"
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
path: 'js-client'
path: "js-client"
ref: "develop"

- name: Update Model According To Specification
working-directory: js-client
run: |
npm install
./update-models.sh

- name: Push Changes Back To Client Repo
working-directory: js-client
run: |
git checkout -b ${GITHUB_SHA::8}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi

git add --all
git commit -m "${{ github.event.inputs.title }}" -a
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --draft
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a

if [ $? -eq 0 ]; then
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --base develop
else
echo "Nothing to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

update-java-client:
needs: title
runs-on: ubuntu-latest
steps:
- name: Specify Java Version
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 11
java-package: jdk

- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'FaceSDK-web-openapi'
path: "FaceSDK-web-openapi"
ref: ${{ github.event.inputs.branch }}

- name: Checkout Java Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/FaceSDK-web-java-client'
repository: "regulaforensics/FaceSDK-web-java-client"
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
path: 'java-client'
path: "java-client"
ref: "develop"

- name: Update Model According To Specification
working-directory: java-client
run: |
./update-models.sh

- name: Push Changes Back To Client Repo
working-directory: java-client
run: |
git checkout -b ${GITHUB_SHA::8}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi

git add --all
git commit -m "${{ github.event.inputs.title }}" -a
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --draft
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a

if [ $? -eq 0 ]; then
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --base develop
else
echo "Nothing to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

update-python-client:
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'FaceSDK-web-openapi'
path: "FaceSDK-web-openapi"
ref: ${{ github.event.inputs.branch }}

- name: Checkout Python Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/FaceSDK-web-python-client'
repository: "regulaforensics/FaceSDK-web-python-client"
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
path: 'python-client'
path: "python-client"
ref: "develop"

- name: Update Model According To Specification
working-directory: python-client
run: |
./update-models.sh

- name: Push Changes Back To Client Repo
working-directory: python-client
run: |
git checkout -b ${GITHUB_SHA::8}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi

git add --all
git commit -m "${{ github.event.inputs.title }}" -a
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --draft
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a

if [ $? -eq 0 ]; then
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --base develop
else
echo "Nothing to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

Expand All @@ -110,31 +181,47 @@ jobs:
- name: Specify Dotnet Version
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
dotnet-version: "3.1.x"

- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'FaceSDK-web-openapi'
- name: Checkout CSharp Client Repo
uses: actions/checkout@v2
path: "FaceSDK-web-openapi"
ref: ${{ github.event.inputs.branch }}

- name: Checkout C# Client Repo
uses: actions/checkout@v4
with:
repository: 'regulaforensics/FaceSDK-web-csharp-client'
repository: "regulaforensics/FaceSDK-web-csharp-client"
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
path: 'csharp-client'
path: "csharp-client"
ref: "develop"

- name: Update Model According To Specification
working-directory: csharp-client
run: |
./update-models.sh

- name: Push Changes Back To Client Repo
working-directory: csharp-client
run: |
git checkout -b ${GITHUB_SHA::8}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout src/Regula.FaceSDK.WebClient/Api/SearchApi.cs

if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi

git add --all
git commit -m "${{ github.event.inputs.title }}" -a
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --draft
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a

if [ $? -eq 0 ]; then
git push --set-upstream origin ${GITHUB_SHA::8}
gh pr create --fill --base develop
else
echo "Nothing to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
24 changes: 17 additions & 7 deletions .github/workflows/validate-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@ on:
pull_request:
branches:
- master
- develop
- stable

jobs:
validate-specification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
npm install -g redoc-cli
npx @redocly/cli build-docs index.yml
- run: |

- name: Install redoc
run: |
npm install -g @redocly/cli
redocly build-docs index.yml

- name: Revert changes
if: ${{ false }}
run: |
npm install -g @openapitools/openapi-generator-cli
openapi-generator-cli validate -i index.yml
openapi-generator-cli validate --recommend -i index.yml
Loading