You've already forked DataMate
@@ -14,6 +14,7 @@ on:
|
||||
- 'scripts/images/datamate-python/**'
|
||||
- '.github/workflows/docker-image-backend-python.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
call-docker-build:
|
||||
|
||||
1
.github/workflows/docker-image-backend.yml
vendored
1
.github/workflows/docker-image-backend.yml
vendored
@@ -14,6 +14,7 @@ on:
|
||||
- 'scripts/images/backend/**'
|
||||
- '.github/workflows/docker-image-backend.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
call-docker-build:
|
||||
|
||||
28
.github/workflows/docker-image-database.yml
vendored
Normal file
28
.github/workflows/docker-image-database.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Database Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'scripts/db/**'
|
||||
- 'scripts/images/database/**'
|
||||
- '.github/workflows/docker-image-database.yml'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'scripts/db/**'
|
||||
- 'scripts/images/database/**'
|
||||
- '.github/workflows/docker-image-database.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
call-docker-build:
|
||||
name: Build and Push Database Docker Image
|
||||
uses: ./.github/workflows/docker-images-reusable.yml
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
with:
|
||||
service_name: database
|
||||
build_dir: .
|
||||
1
.github/workflows/docker-image-deer-flow.yml
vendored
1
.github/workflows/docker-image-deer-flow.yml
vendored
@@ -16,6 +16,7 @@ on:
|
||||
- 'scripts/images/deer-flow-frontend/**'
|
||||
- '.github/workflows/docker-image-deer-flow.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
|
||||
1
.github/workflows/docker-image-frontend.yml
vendored
1
.github/workflows/docker-image-frontend.yml
vendored
@@ -14,6 +14,7 @@ on:
|
||||
- 'scripts/images/frontend/**'
|
||||
- '.github/workflows/docker-image-frontend.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
call-docker-build:
|
||||
|
||||
7
.github/workflows/docker-image-runtime.yml
vendored
7
.github/workflows/docker-image-runtime.yml
vendored
@@ -4,16 +4,19 @@ on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'runtime/**'
|
||||
- 'runtime/ops/**'
|
||||
- 'runtime/python-executor/**'
|
||||
- 'scripts/images/runtime/**'
|
||||
- '.github/workflows/docker-image-runtime.yml'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'runtime/**'
|
||||
- 'runtime/ops/**'
|
||||
- 'runtime/python-executor/**'
|
||||
- 'scripts/images/runtime/**'
|
||||
- '.github/workflows/docker-image-runtime.yml'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
call-docker-build:
|
||||
|
||||
13
.github/workflows/docker-images-reusable.yml
vendored
13
.github/workflows/docker-images-reusable.yml
vendored
@@ -51,7 +51,18 @@ jobs:
|
||||
docker tag datamate-${{ inputs.service_name }}:latest ${{ steps.set-tag.outputs.TAGS }}
|
||||
|
||||
- name: Push Docker Image
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && !startsWith(github.workflow, 'Package')
|
||||
run: |
|
||||
docker push ${{ steps.set-tag.outputs.TAGS }}
|
||||
|
||||
- name: Save Docker Image
|
||||
if: startsWith(github.workflow, 'Package')
|
||||
run: |
|
||||
docker save -o datamate-${{ inputs.service_name }}.tar ${{ steps.set-tag.outputs.TAGS }}
|
||||
|
||||
- name: Upload Docker Image
|
||||
if: startsWith(github.workflow, 'Package')
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: datamate-${{ inputs.service_name }}
|
||||
path: datamate-${{ inputs.service_name }}.tar
|
||||
58
.github/workflows/package.yml
vendored
Normal file
58
.github/workflows/package.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Package All
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
backend-docker-build:
|
||||
name: Build and Push Backend Docker Image
|
||||
uses: ./.github/workflows/docker-image-backend.yml
|
||||
|
||||
frontend-docker-build:
|
||||
name: Build and Push Frontend Docker Image
|
||||
uses: ./.github/workflows/docker-image-frontend.yml
|
||||
|
||||
database-docker-build:
|
||||
name: Build and Push Database Docker Image
|
||||
uses: ./.github/workflows/docker-image-database.yml
|
||||
|
||||
runtime-docker-build:
|
||||
name: Build and Push Runtime Docker Image
|
||||
uses: ./.github/workflows/docker-image-runtime.yml
|
||||
|
||||
backend-python-docker-build:
|
||||
name: Build and Push Backend Python Docker Image
|
||||
uses: ./.github/workflows/docker-image-backend-python.yml
|
||||
|
||||
package-all:
|
||||
needs:
|
||||
- backend-docker-build
|
||||
- frontend-docker-build
|
||||
- database-docker-build
|
||||
- backend-python-docker-build
|
||||
- runtime-docker-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Save Image
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: images
|
||||
pattern: datamate-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cp runtime/deer-flow/.env.example deployment/docker/deer-flow/.env
|
||||
cp runtime/deer-flow/conf.yaml.example deployment/docker/deer-flow/conf.yaml
|
||||
cp runtime/deer-flow/.env.example deployment/helm/deer-flow/charts/public/.env
|
||||
cp runtime/deer-flow/conf.yaml.example deployment/helm/deer-flow/charts/public/conf.yaml
|
||||
tar -cvf datamate.tar deployment/ images
|
||||
|
||||
- name: Upload Package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: package
|
||||
path: datamate.tar
|
||||
Reference in New Issue
Block a user