diff --git a/.github/workflows/back-merge-handler.yml b/.github/workflows/back-merge-handler.yml index 0346f03..4030959 100644 --- a/.github/workflows/back-merge-handler.yml +++ b/.github/workflows/back-merge-handler.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest if: github.ref_name == 'master' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 @@ -41,7 +41,11 @@ jobs: - name: Create Pull Request if: env.SKIP != 'true' - run: gh pr create -B stable -H master --title '[GitHub Actions] Merge master -> stable' --label back-merge --body 'Autogenerated Pull Request for `back-merge` triggered by Github Actions' + run: | + gh pr create -B stable -H master \ + --title '[GitHub Actions] Merge master -> stable' \ + --label back-merge \ + --body 'Autogenerated Pull Request for `back-merge` triggered by GitHub Actions' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,7 +53,7 @@ jobs: runs-on: ubuntu-latest if: github.ref_name == 'stable' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 @@ -79,6 +83,10 @@ jobs: - name: Create Pull Request if: env.SKIP != 'true' - run: gh pr create -B develop -H stable --title '[GitHub Actions] Merge stable -> develop' --label back-merge --body 'Autogenerated Pull Request for `back-merge` triggered by Github Actions' + run: | + gh pr create -B develop -H stable \ + --title '[GitHub Actions] Merge stable -> develop' \ + --label back-merge \ + --body 'Autogenerated Pull Request for `back-merge` triggered by GitHub Actions' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/make-prs-for-client-repos.yml b/.github/workflows/make-prs-for-client-repos.yml index ce35e5d..c147034 100644 --- a/.github/workflows/make-prs-for-client-repos.yml +++ b/.github/workflows/make-prs-for-client-repos.yml @@ -27,7 +27,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Create PR for Python 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-python-client + 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 }} @@ -35,7 +40,12 @@ jobs: 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 + 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 }} @@ -43,7 +53,12 @@ jobs: 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 + 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 }} @@ -51,7 +66,12 @@ jobs: 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 + 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 }} @@ -59,6 +79,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Create PR for OpenAPI 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-openapi + 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-openapi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} diff --git a/.github/workflows/release-web-page.yml b/.github/workflows/release-web-page.yml index 6a4a3dc..de5d014 100644 --- a/.github/workflows/release-web-page.yml +++ b/.github/workflows/release-web-page.yml @@ -7,32 +7,37 @@ on: jobs: build-and-push: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout Specifications - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: 'master-branch' + - name: Install redoc-cli - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20 registry-url: https://registry.npmjs.org/ + - name: Build html page working-directory: master-branch run: | npm install -g @redocly/cli; npx @redocly/cli build-docs index.yml -o=doc.html; + - name: Checkout pages branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: 'pages-branch' ref: 'gh-pages' + - name: Rewrite html page working-directory: pages-branch run: | rm index.html mv ../master-branch/doc.html index.html + - name: Push changes working-directory: pages-branch run: | diff --git a/.github/workflows/update-clients.yml b/.github/workflows/update-clients.yml index a02da30..28c0fa3 100644 --- a/.github/workflows/update-clients.yml +++ b/.github/workflows/update-clients.yml @@ -32,18 +32,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - path: "FaceSDK-web-openapi" + path: 'FaceSDK-web-openapi' ref: ${{ github.event.inputs.branch }} - name: Checkout JS Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - repository: "regulaforensics/FaceSDK-web-js-client" + repository: 'regulaforensics/FaceSDK-web-js-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} - path: "js-client" - ref: "develop" + path: 'js-client' + ref: 'develop' - name: Update Model According To Specification working-directory: js-client @@ -64,13 +64,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -80,25 +87,25 @@ jobs: runs-on: ubuntu-latest steps: - name: Specify Java Version - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - distribution: "zulu" + distribution: 'zulu' java-version: 11 java-package: jdk - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - path: "FaceSDK-web-openapi" + path: 'FaceSDK-web-openapi' ref: ${{ github.event.inputs.branch }} - name: Checkout Java Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - repository: "regulaforensics/FaceSDK-web-java-client" + repository: 'regulaforensics/FaceSDK-web-java-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} - path: "java-client" - ref: "develop" + path: 'java-client' + ref: 'develop' - name: Update Model According To Specification working-directory: java-client @@ -118,13 +125,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -133,18 +147,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - path: "FaceSDK-web-openapi" + path: 'FaceSDK-web-openapi' ref: ${{ github.event.inputs.branch }} - name: Checkout Python Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - repository: "regulaforensics/FaceSDK-web-python-client" + repository: 'regulaforensics/FaceSDK-web-python-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} - path: "python-client" - ref: "develop" + path: 'python-client' + ref: 'develop' - name: Update Model According To Specification working-directory: python-client @@ -164,13 +178,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -179,23 +200,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Specify Dotnet Version - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v5 with: - dotnet-version: "3.1.x" + dotnet-version: '3.1.x' - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - path: "FaceSDK-web-openapi" + path: 'FaceSDK-web-openapi' ref: ${{ github.event.inputs.branch }} - name: Checkout C# Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - repository: "regulaforensics/FaceSDK-web-csharp-client" + repository: 'regulaforensics/FaceSDK-web-csharp-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} - path: "csharp-client" - ref: "develop" + path: 'csharp-client' + ref: 'develop' - name: Update Model According To Specification working-directory: csharp-client @@ -215,13 +236,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} diff --git a/.github/workflows/validate-spec.yml b/.github/workflows/validate-spec.yml index b343645..82ba18c 100644 --- a/.github/workflows/validate-spec.yml +++ b/.github/workflows/validate-spec.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/verify-clients.yml b/.github/workflows/verify-clients.yml index d053cee..467f8dc 100644 --- a/.github/workflows/verify-clients.yml +++ b/.github/workflows/verify-clients.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: 'FaceSDK-web-openapi' - name: Checkout Python Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: 'regulaforensics/FaceSDK-web-python-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -33,12 +33,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: 'FaceSDK-web-openapi' - name: Checkout CSharp Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: 'regulaforensics/FaceSDK-web-csharp-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -54,16 +54,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - path: "FaceSDK-web-openapi" + path: 'FaceSDK-web-openapi' - name: Checkout JS Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 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' - name: Verify update JS client working-directory: js-client @@ -75,19 +75,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Specify Java Version - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - distribution: "zulu" + distribution: 'zulu' java-version: 11 java-package: jdk - name: Checkout Specification Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: 'FaceSDK-web-openapi' - name: Checkout Java Client Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: 'regulaforensics/FaceSDK-web-java-client' token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}