Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/datamodel-create-dumps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 📦 Datamodel | Create dumps

concurrency:
group: dumps-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name != 'workflow_call' }}

on:
push:
Expand All @@ -18,8 +18,13 @@ on:
- datamodel/**
- '.github/workflows/datamodel-create-dumps.yml'
workflow_dispatch:
workflow_call:

workflow_call: # Allows this workflow to be called by other workflows
inputs:
release_tag:
required: false
description: 'Release tag to upload dumps as GitHub Release asset'
default: ''
type: string

jobs:
datamodel-dumps:
Expand Down Expand Up @@ -59,3 +64,13 @@ jobs:
name: datamodel-schemaspy
path: datamodel/schemaspy/
if-no-files-found: error

- name: Upload datamodel dumps as GitHub Release asset
if: ${{ inputs.release_tag != '' }}
run: |
gh release upload "${{ inputs.release_tag }}" datamodel-dumps.zip --repo "$GITHUB_REPOSITORY"
gh release upload "${{ inputs.release_tag }}" datamodel-schemaspy.zip --repo "$GITHUB_REPOSITORY"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 📦 Release

on:
release:
types: [published]

jobs:
datamodel-create-dumps:
name: Call Datamodel Create Dumps Workflow
uses: ./.github/workflows/datamodel-create-dumps.yml
with:
release_tag: ${{ github.event.release.tag_name }}