mirror of
https://github.com/datahub-project/datahub.git
synced 2026-01-28 05:41:57 +00:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: metadata model generate
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
release:
|
|
types: [published]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
setup:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
publish: ${{ steps.publish.outputs.publish }}
|
|
steps:
|
|
- name: Check whether upload to datahub is enabled
|
|
id: publish
|
|
env:
|
|
ENABLE_PUBLISH: ${{ secrets.DataHubToken }}
|
|
run: |
|
|
echo "Enable publish: ${{ env.ENABLE_PUBLISH != '' }}"
|
|
echo "publish=${{ env.ENABLE_PUBLISH != '' }}" >> $GITHUB_OUTPUT
|
|
metadata-ingestion-docgen:
|
|
runs-on: ubuntu-latest
|
|
needs: setup
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Install dependencies
|
|
run: ./metadata-ingestion/scripts/install_deps.sh
|
|
- name: Run model generation
|
|
run: ./gradlew :metadata-models:build
|
|
- name: Upload metadata to DataHub
|
|
if: ${{ needs.setup.outputs.publish == 'true' }}
|
|
env:
|
|
DATAHUB_SERVER: ${{ secrets.DataHubServer }}
|
|
DATAHUB_TOKEN: ${{ secrets.DataHubToken }}
|
|
run: ./gradlew :metadata-ingestion:modelDocUpload
|