mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-20 06:21:45 +00:00
Validate on PR and push on main
This commit is contained in:
parent
076f7e306b
commit
c83429fdf3
12
.github/workflows/py-generate.yml
vendored
12
.github/workflows/py-generate.yml
vendored
@ -6,6 +6,11 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'catalog-rest-service/src/main/resources/json/**'
|
- 'catalog-rest-service/src/main/resources/json/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'catalog-rest-service/src/main/resources/json/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
@ -24,11 +29,14 @@ jobs:
|
|||||||
python3 -m venv env
|
python3 -m venv env
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
make install_dev
|
make install_dev
|
||||||
- name: Commit Models
|
- name: Generate models
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
make generate
|
make generate
|
||||||
|
- name: Push models
|
||||||
|
# Push the generated models if we are running in a push to main
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
|
run: |
|
||||||
git config --global user.name 'open-metadata'
|
git config --global user.name 'open-metadata'
|
||||||
git config --global user.email 'open-metadata@users.noreply.github.com'
|
git config --global user.email 'open-metadata@users.noreply.github.com'
|
||||||
git add -A
|
git add -A
|
||||||
|
Loading…
x
Reference in New Issue
Block a user