Skip to content

Commit

Permalink
force-publish java CDK on push to master (#36476)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte authored Mar 26, 2024
1 parent 595455e commit 441bc77
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish-java-cdk-command.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.

# Usage: This workflow can be invoked manually or by a slash command.
#
# To invoke via GitHub UI, go to Actions tab, select the workflow, and click "Run workflow".
Expand All @@ -8,6 +10,11 @@
# /publish-java-cdk force=true # Force-publish if needing to replace an already published version
name: Publish Java CDK
on:
push:
branches:
- master
paths:
- "./airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties"
workflow_dispatch:
inputs:
repo:
Expand Down Expand Up @@ -41,7 +48,7 @@ concurrency:
env:
# Use the provided GITREF or default to the branch triggering the workflow.
GITREF: ${{ github.event.inputs.gitref || github.ref }}
FORCE: "${{ github.event.inputs.force == null && 'false' || github.event.inputs.force }}"
FORCE: "${{ github.event_name == 'push' || github.event.inputs.force == null && 'false' || github.event.inputs.force }}"
DRY_RUN: "${{ github.event.inputs.dry-run == null && 'true' || github.event.inputs.dry-run }}"
CDK_VERSION_FILE_PATH: "./airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties"
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -101,7 +108,8 @@ jobs:
arguments: --scan :airbyte-cdk:java:airbyte-cdk:cdkBuild

- name: Check for Existing Version
if: ${{ !(env.FORCE == 'true') }}
# we only check existing version if it's a manual trigger and FORCE is set to false
if: ${{ (env.FORCE != 'true') }}
uses: burrunan/gradle-cache-action@v1
env:
CI: true
Expand Down

0 comments on commit 441bc77

Please sign in to comment.