-
-
Notifications
You must be signed in to change notification settings - Fork 358
67 lines (60 loc) · 2.4 KB
/
publish-docker-dev.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Dev - Build and Test
on:
push:
branches-ignore:
- main
workflow_dispatch:
jobs:
build-agixt:
runs-on: ubuntu-latest
outputs:
github_user: ${{ steps.extract_info.outputs.github_user }}
repo_name: ${{ steps.extract_info.outputs.repo_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract GitHub info and ensure lowercase
id: extract_info
run: |
echo "github_user=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
echo "repo_name=$(echo ${{ github.repository }} | cut -d'/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/${{ steps.extract_info.outputs.github_user }}/${{ steps.extract_info.outputs.repo_name }}:dev
ghcr.io/${{ steps.extract_info.outputs.github_user }}/${{ steps.extract_info.outputs.repo_name }}:${{ github.sha }}
test-agixt-postgres:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests/endpoint-tests.ipynb
image: ghcr.io/${{ needs.build-agixt.outputs.github_user }}/${{ needs.build-agixt.outputs.repo_name }}:${{ github.sha }}
port: "7437"
database-type: "postgresql"
report-name: "agixt-postgres-tests"
additional-python-dependencies: openai requests agixtsdk qrcode
needs: build-agixt
test-agixt-sqlite:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests/endpoint-tests.ipynb
image: ghcr.io/${{ needs.build-agixt.outputs.github_user }}/${{ needs.build-agixt.outputs.repo_name }}:${{ github.sha }}
port: "7437"
database-type: "sqlite"
report-name: "agixt-sqlite-tests"
additional-python-dependencies: openai requests agixtsdk qrcode
needs: build-agixt