Skip to content

Populate pull requests #28

Populate pull requests

Populate pull requests #28

Workflow file for this run

name: Update SDKs
on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
permissions:
contents: read
concurrency:
group: ci-sdk-automation
jobs:
generate:
strategy:
matrix:
project: [ go, php, java, node, dotnet, python, ruby ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Clone ${{ matrix.project }} repository
uses: actions/checkout@v4
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
repository: Adyen/adyen-${{ matrix.project }}-api-library
path: ${{ matrix.project }}/repo
- name: Generate code for ${{ matrix.project }}
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: ${{ matrix.project }}:services
- name: Set PR variables
id: vars
run: |
cd schema
echo pr_title="Update all services" >> "$GITHUB_OUTPUT"
echo pr_body="OpenAPI spec or templates produced changes on $(date +%d-%m-%Y) \
by [commit](https://github.com/Adyen/adyen-openapi/commit/$(git rev-parse HEAD))." >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
path: ${{ matrix.project }}/repo
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
branch: sdk-automation/models
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
commit-message: |
${{ contains(fromJSON('["go", "php", "node"]'), matrix.project) && '[reformat]' }}[adyen-sdk-automation] automated change