Skip to content

Commit

Permalink
CI. Bump action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiPaulau committed Dec 6, 2024
1 parent 7db368e commit f1fdd15
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 39 deletions.
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/DocumentReader-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/DocumentReader-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/DocumentReader-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/DocumentReader-web-csharp-client
env:
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

openapi-pr:
runs-on: ubuntu-latest
steps:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release-web-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,27 @@ on:
repository_dispatch:
types: [release-web-page]


jobs:
build-and-push:
if: ${{ github.event.client_payload.success }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout Specifications
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'master-branch'
path: "master-branch"

- name: Install yq
uses: vegardit/gha-setup-yq@v1
uses: mikefarah/yq@v4.44.5
with:
version: 4.44.2

- name: Replace index.yml version
run: yq -i ".info.version =\"${{ github.event.client_payload.version }}\"" index.yml
cmd: yq -i ".info.version =\"${{ github.event.client_payload.version }}\"" index.yml

- name: Install redoc-cli
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14
registry-url: https://registry.npmjs.org/

- name: Build html page
working-directory: master-branch
run: |
Expand All @@ -37,16 +34,19 @@ jobs:
--options.theme.colors.primary.main="#8a53cb" --options.expandResponses="all" \
--options.expandSingleSchemaField --options.hideDownloadButton \
--options.jsonSampleExpandLevel="6";
- name: Checkout pages branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: 'pages-branch'
ref: 'gh-pages'
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: |
Expand All @@ -61,5 +61,5 @@ jobs:
- name: Pushing tag to Repo
uses: thejeff77/[email protected]
with:
tag: v${{ github.event.client_payload.version }}
tag: v${{ github.event.client_payload.version }}
if: ${{ success() }}
16 changes: 11 additions & 5 deletions .github/workflows/validate-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ jobs:
validate-specification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: |

- name: Install redoc
run: |
npm install -g redoc-cli
redoc-cli bundle index.yml
- if: ${{ false }}
- name: Revert changes
if: ${{ false }}
run: |
npm install -g @openapitools/openapi-generator-cli
openapi-generator-cli validate -i index.yml
48 changes: 28 additions & 20 deletions .github/workflows/verify-clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'DocumentReader-web-openapi'
path: "DocumentReader-web-openapi"

- name: Checkout Python Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/DocumentReader-web-python-client'
path: 'python-client'
repository: "regulaforensics/DocumentReader-web-python-client"
path: "python-client"

- name: Verify update Python client
working-directory: python-client
run: |
Expand All @@ -29,14 +31,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'DocumentReader-web-openapi'
path: "DocumentReader-web-openapi"

- name: Checkout CSharp Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/DocumentReader-web-csharp-client'
path: 'csharp-client'
repository: "regulaforensics/DocumentReader-web-csharp-client"
path: "csharp-client"

- name: Verify update CSharp client
working-directory: csharp-client
run: |
Expand All @@ -46,14 +50,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'DocumentReader-web-openapi'
path: "DocumentReader-web-openapi"

- name: Checkout JS Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/DocumentReader-web-js-client'
path: 'js-client'
repository: "regulaforensics/DocumentReader-web-js-client"
path: "js-client"

- name: Verify update JS client
working-directory: js-client
run: |
Expand All @@ -65,14 +71,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Specification Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'DocumentReader-web-openapi'
path: "DocumentReader-web-openapi"

- name: Checkout Java Client Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'regulaforensics/DocumentReader-web-java-client'
path: 'java-client'
repository: "regulaforensics/DocumentReader-web-java-client"
path: "java-client"

- name: Verify update Java client
working-directory: java-client
run: |
Expand Down

0 comments on commit f1fdd15

Please sign in to comment.