Skip to content

CTM-414: Fix RStudio image detection when JUPYTER_HOME is also present #7402

CTM-414: Fix RStudio image detection when JUPYTER_HOME is also present

CTM-414: Fix RStudio image detection when JUPYTER_HOME is also present #7402

name: Publish Java Client
on:
workflow_dispatch:
push:
branches: [ develop ]
paths-ignore: ['**.md']
pull_request:
branches: [ develop ]
paths-ignore: ['**.md']
merge_group:
branches: [ develop ]
paths-ignore: ['**.md']
concurrency:
# Don't run this workflow concurrently on the same branch
group: ${{ github.workflow }}-${{ github.ref }}
# For PRs, don't wait for completion of existing runs, cancel them instead
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
generateAndPublishClient:
runs-on: ubuntu-latest
permissions:
id-token: write
env:
SBT_OPTS: -Xmx3g
steps:
- uses: actions/checkout@v4
- uses: sbt/setup-sbt@v1
# coursier cache action caches both coursier and sbt caches
- name: coursier-cache-action
uses: actions/cache@v3
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extractBranch
- name: Generate java client
id: generateJavaClient
run: bash codegen_java/gen_java_client.sh
- name: Auth to GCP
id: 'auth'
uses: google-github-actions/auth@v2
with:
token_format: 'access_token'
workload_identity_provider: 'projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider'
service_account: 'dsp-artifact-registry-push@dsp-artifact-registry.iam.gserviceaccount.com'
- name: Publish java client for merge to develop branch
working-directory: codegen_java
id: publishJavaClient
if: ${{steps.extractBranch.outputs.branch == 'develop'}}
run: sbt "+ publish" -Dproject.isSnapshot=false
- name: Publish java client as snapshot for PRs
working-directory: codegen_java
id: publishJavaClientSnapshot
if: ${{steps.extractBranch.outputs.branch != 'develop'}}
run: sbt "+ publish" -Dproject.isSnapshot=true