From 0138e148e799129bcdb3c420ba34d660483393f6 Mon Sep 17 00:00:00 2001 From: Michael Paul Date: Wed, 28 Sep 2022 15:34:33 +0200 Subject: [PATCH] PW-7094: Dynamic title and body for automatic PR (#1006) --- .github/workflows/models.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/models.yml b/.github/workflows/models.yml index c1ccdf7..9ad33ec 100644 --- a/.github/workflows/models.yml +++ b/.github/workflows/models.yml @@ -8,8 +8,14 @@ jobs: name: Generate Models steps: - uses: actions/checkout@v3 - - name: Generate models - run: make models + - run: make models + - name: Set PR variables + id: vars + run: | + cd build/spec + echo ::set-output name=pr_title::"Update models" + echo ::set-output name=pr_body::"OpenAPI spec or templates produced new models on $(date +%d-%m-%Y) \ + by [commit](https://github.com/Adyen/adyen-openapi/commit/$(git rev-parse HEAD))." - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: @@ -18,7 +24,7 @@ jobs: author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }} base: develop branch: automation/models - title: Update models - body: OpenAPI spec or templates produced new models. + title: ${{ steps.vars.outputs.pr_title }} + body: ${{ steps.vars.outputs.pr_body }} add-paths: | src/typings