Skip to content

Update SDKs

Update SDKs #175

Workflow file for this run

name: Update SDKs
on:
workflow_dispatch:
push:
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: Setup Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
- name: Override properties
if: matrix.project == 'node'
run: cp ${{ matrix.project }}/gradle.properties buildSrc
- name: Generate code for ${{ matrix.project }}
run: ./gradlew ${{ 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@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
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