PW-6591: Add new job to generate models (#902)

* PW-6591: Add new job to generate models

* PW-6591: Point to checkout spec

* PW-6591: Use generator from Docker image

* PW-6591: Reset templates to defaults

* PW-6591: Updating templates

* PW-6591: Propose changes via PR

* PW-6591: PR via external action

* PW-6591: Based on develop

* PW-6591: Update PR details

* PW-6591: Pin generator to v5.4.0

* PW-6591: Updating templates

Keep previous property template and move custom SaleToAcquirerData serializer to template.

* PW-6591: Author PR as Adyen bot

* PW-6591: Update author
This commit is contained in:
Michael Paul
2022-06-30 10:57:01 +02:00
committed by GitHub
parent 020a392239
commit 55c924f925
5 changed files with 254 additions and 12 deletions

29
.github/workflows/models.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Node.js Models
on: [ workflow_dispatch, pull_request ]
jobs:
generate:
runs-on: ubuntu-latest
name: Generate Models
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate models
run: make models
- name: Overwrite current models
run: |
rm -rf src/typings/checkout
cp -r build/model src/typings/checkout
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
base: develop
branch: automation/models
title: Update models
body: OpenAPI spec or templates produced new models.
add-paths: |
src/typings/checkout