Skip to content

Commit e6b2d2c

Browse files
almost complete cicd
1 parent 45b02e4 commit e6b2d2c

2 files changed

Lines changed: 99 additions & 9 deletions

File tree

.github/workflows/research-ci.yml

Lines changed: 98 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,103 @@
1-
name: Research Agent CI
1+
# name: Research Agent CI
2+
3+
# on:
4+
# push:
5+
# branches: [main]
6+
# paths:
7+
# - 'agents/research_agent/**'
8+
# # - '**.py'
9+
# # - '**.html'
10+
# pull_request:
11+
# branches: [ main ]
12+
# paths:
13+
# - 'agents/research_agent/**'
14+
15+
# env:
16+
# python-version: '3.9'
17+
18+
# jobs:
19+
# unit_test:
20+
# name: Run unit tests
21+
# runs-on: ubuntu-latest
22+
23+
# steps:
24+
# - name: Code checkout
25+
# uses: actions/checkout@v4
26+
27+
# - name: Setup Python
28+
# uses: actions/setup-python@v5
29+
# with:
30+
# python-version: ${{ env.python-version }}
31+
# cache: 'pip' # caching pip dependencies
32+
33+
# - name: Install dependencies
34+
# run: pip install -r agents/research_agent/requirements.txt
35+
36+
# build_and_deploy:
37+
# name: Build, Scan, Push, and Deploy
38+
# runs-on: ubuntu-latest
39+
# needs: [unit_test]
40+
# environment: production
41+
42+
# env:
43+
# REGISTRY: ghcr.io
44+
# IMAGE_NAME: ${{ github.repository }}
45+
# outputs:
46+
# image_tag: ${{ steps.set_output.outputs.image_tag }}
47+
48+
# steps:
49+
# - name: Code checkout
50+
# uses: actions/checkout@v4
51+
52+
# - name: Log in to Azure
53+
# uses: azure/login@v1
54+
# with:
55+
# creds: ${{ secrets.AZURE_CREDENTIALS }}
56+
57+
# - name: Login to Github Container Registry
58+
# uses: docker/login-action@v3
59+
# with:
60+
# registry: ${{ env.REGISTRY}}
61+
# username: ${{ github.actor }}
62+
# password: ${{ secrets.GHCR_TOKEN }}
63+
64+
# - name: Setup Docker
65+
# uses: docker/setup-buildx-action@v3
66+
67+
# - name: Build Docker Image
68+
# uses: docker/build-push-action@v6
69+
# with:
70+
# context: ./agents/research_agent
71+
# push: false
72+
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.run_number }}
73+
# load: true
74+
75+
# - name: Run vulnerability scan (Trivy)
76+
# uses: aquasecurity/trivy-action@0.30.0
77+
# with:
78+
# image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.run_number }}
79+
# format: 'table'
80+
# #exit-code: '1'
81+
# ignore-unfixed: true
82+
# vuln-type: 'os,library'
83+
# severity: 'CRITICAL'
84+
85+
# - name: Push images to GHCR
86+
# run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.run_number }}
87+
88+
# - name: Output Image name
89+
# run: echo "image_tag=$(echo ${{ github.run_number }})" >> $GITHUB_OUTPUT
90+
91+
# - name: Deploy to Azure Container Apps
92+
# uses: Azure/container-apps-deploy-action@v2
93+
# with:
94+
# imageToDeploy: ${{ env.IMAGE_NAME }}:${{ github.run_number }}
95+
# containerAppName: your-containerapp-name
96+
# resourceGroup: your-resource-group-name
97+
# environment: your-containerapp-environment-name
98+
299

3-
on:
4-
push:
5-
paths:
6-
- 'agents/research_agent/**'
7-
- '**.py'
8-
- '**.html'
9100

10-
jobs:
11101

12102

13103

agents/research_agent/deployment_instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ az containerapp create \
1717
--image $IMAGE:TAG \
1818
--target-port 8000 \
1919
--ingress 'external' \
20-
--environment '$ENV_NAME' \
20+
--environment $ENV_NAME \
2121
--registry-server index.docker.io \
2222
--registry-username $REG_USER \
2323
--registry-password $REG_TOKEN \

0 commit comments

Comments
 (0)