Fix SDCOSMO-1956: Runner child doesn't inherit parent's parameters #2599
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpenAPI Clients | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
- '!*-test' | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: [ main ] | |
jobs: | |
generate_and_push_openapi_clients: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: python | |
gradle_task: generatePythonClient | |
repo: cosmotech-api-python-client | |
- language: typescript | |
gradle_task: generateTypescriptClient | |
repo: cosmotech-api-typescript-client | |
concurrency: | |
group: ${{ matrix.language }}-openapi-client_update-${{ github.ref }} | |
cancel-in-progress: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Fetch all tags since Gradle project version is built upon SCM | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-disabled: true | |
- name: Generate Client (${{ matrix.language }}) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew ${{ matrix.gradle_task }} | |
- name: Set Git identity | |
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
git config --global user.email csmplatform@users.noreply.github.com | |
git config --global user.name "csmplatform" | |
- name: Generate commit message file | |
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
id: commitMsgGenerator | |
run: | | |
echo -e "Automatically update ${{ matrix.language }} client (ref: ${{ github.repository }}@${{ github.sha }})\n" > /tmp/commit-file.txt | |
echo "Co-authored-by: $GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" >> /tmp/commit-file.txt | |
echo "::set-output name=filePath::/tmp/commit-file.txt" | |
- name: Push ${{ matrix.language }} Client to ${{ matrix.repo }} | |
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GIT_TOKEN: ${{ secrets.OPENAPI_CLIENTS_GITHUB_PAT }} | |
GIT_COMMIT_MESSAGE_FILE: ${{ steps.commitMsgGenerator.outputs.filePath }} | |
run: | | |
./scripts/clients/publish_client.sh \ | |
${{ matrix.language }} \ | |
${{ github.actor }} \ | |
"Automatically update ${{ matrix.language }} client (ref: ${{ github.repository }}@${{ github.sha }})" |