forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.6 KB
/
deploy-oss-catalog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy OSS Connector Catalog to GCS
on:
push:
branches:
- master
paths:
- airbyte-config/init/src/main/resources/seed/**
workflow_dispatch:
jobs:
deploy-catalog:
name: "Deploy Catalog"
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
concurrency: deploy-oss-connector-catalog
steps:
- name: Checkout Airbyte
uses: actions/checkout@v3
- name: Setup Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.PROD_SPEC_CACHE_SA_KEY }}
export_default_credentials: true
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Generate catalog
run: SUB_BUILD=PLATFORM ./gradlew :airbyte-config:init:processResources
- name: Upload catalog to GCS
shell: bash
run: |
gcs_bucket_name="prod-airbyte-cloud-connector-metadata-service"
catalog_path="airbyte-config/init/src/main/resources/seed/oss_catalog.json"
gsutil -h "Cache-Control:public, max-age=10" cp "$catalog_path" "gs://$gcs_bucket_name/oss_catalog.json"
- name: Check PAT rate limits
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
- name: Trigger Cloud catalog generation
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ env.PAT }}
repository: airbytehq/airbyte-cloud
event-type: generate-cloud-catalog