From 5d27994227eb61f93f78a09682d5acdf82b484a8 Mon Sep 17 00:00:00 2001 From: git-phu Date: Wed, 20 Apr 2022 15:39:31 -0700 Subject: [PATCH 1/2] notify cloud repo on push to master --- .github/workflows/notify-on-push-to-master.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/notify-on-push-to-master.yml diff --git a/.github/workflows/notify-on-push-to-master.yml b/.github/workflows/notify-on-push-to-master.yml new file mode 100644 index 000000000000..48f3a8f35271 --- /dev/null +++ b/.github/workflows/notify-on-push-to-master.yml @@ -0,0 +1,18 @@ +name: Notify Cloud of OSS Push to Master +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + repo-sync: + runs-on: ubuntu-latest + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.OCTAVIA_PAT }} + repository: airbytehq/airbyte-cloud + event-type: oss-push-to-master + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' From b22d043a4cfd1f4feb3e0b3c9315d3550079c099 Mon Sep 17 00:00:00 2001 From: git-phu Date: Wed, 20 Apr 2022 16:25:31 -0700 Subject: [PATCH 2/2] split out build-branch action so we can use it in cloud workflow --- .../actions/build-and-push-branch/action.yml | 43 ++------------- .github/actions/build-branch/action.yml | 52 +++++++++++++++++++ 2 files changed, 57 insertions(+), 38 deletions(-) create mode 100644 .github/actions/build-branch/action.yml diff --git a/.github/actions/build-and-push-branch/action.yml b/.github/actions/build-and-push-branch/action.yml index 80f2d4109854..6be0a94d2e99 100644 --- a/.github/actions/build-and-push-branch/action.yml +++ b/.github/actions/build-and-push-branch/action.yml @@ -10,44 +10,11 @@ inputs: runs: using: "composite" steps: - - name: "Parse Input" - id: parse-input - shell: bash - run: |- - # if the *branch_version_tag* input param is not specified, then generate it as 'dev-` - # - [[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "::set-output name=branch_version_tag::${{ inputs.branch_version_tag }}" \ - || { short_hash=$(git rev-parse --short HEAD); echo "::set-output name=branch_version_tag::dev-$short_hash"; } - - - uses: actions/setup-java@v1 - with: - java-version: "17" - - - uses: actions/setup-node@v1 - with: - node-version: "16.13.0" - - - name: Set up CI Gradle Properties - run: | - mkdir -p ~/.gradle/ - cat > ~/.gradle/gradle.properties <" to pass AirbyteVersion validation)' + required: false +outputs: + branch_version_tag: + description: 'Tag used for jars and docker images. Either user specified or auto generated as `dev-`' + value: ${{ steps.parse-input.outputs.branch_version_tag }} +runs: + using: "composite" + steps: + - name: "Parse Input" + id: parse-input + shell: bash + run: |- + # if the *branch_version_tag* input param is not specified, then generate it as 'dev-` + # + [[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "::set-output name=branch_version_tag::${{ inputs.branch_version_tag }}" \ + || { short_hash=$(git rev-parse --short HEAD); echo "::set-output name=branch_version_tag::dev-$short_hash"; } + + - uses: actions/setup-java@v1 + with: + java-version: "17" + + - uses: actions/setup-node@v1 + with: + node-version: "16.13.0" + + - name: Set up CI Gradle Properties + run: | + mkdir -p ~/.gradle/ + cat > ~/.gradle/gradle.properties <