Skip to content

Commit 0b824d3

Browse files
authored
Merge branch 'dev' into master
2 parents be135ff + 0c51721 commit 0b824d3

File tree

54 files changed

+1000
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1000
-237
lines changed

.github/dependabot.yml

+179
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
version: 2
2+
updates:
3+
# autogpt_libs (Poetry project)
4+
- package-ecosystem: "pip"
5+
directory: "autogpt_platform/autogpt_libs"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
target-branch: "dev"
10+
groups:
11+
production-dependencies:
12+
dependency-type: "production"
13+
update-types:
14+
- "minor"
15+
- "patch"
16+
development-dependencies:
17+
dependency-type: "development"
18+
update-types:
19+
- "minor"
20+
- "patch"
21+
22+
# backend (Poetry project)
23+
- package-ecosystem: "pip"
24+
directory: "autogpt_platform/backend"
25+
schedule:
26+
interval: "weekly"
27+
open-pull-requests-limit: 10
28+
target-branch: "dev"
29+
groups:
30+
production-dependencies:
31+
dependency-type: "production"
32+
update-types:
33+
- "minor"
34+
- "patch"
35+
development-dependencies:
36+
dependency-type: "development"
37+
update-types:
38+
- "minor"
39+
- "patch"
40+
41+
42+
# frontend (Next.js project)
43+
- package-ecosystem: "npm"
44+
directory: "autogpt_platform/frontend"
45+
schedule:
46+
interval: "weekly"
47+
open-pull-requests-limit: 10
48+
target-branch: "dev"
49+
groups:
50+
production-dependencies:
51+
dependency-type: "production"
52+
update-types:
53+
- "minor"
54+
- "patch"
55+
development-dependencies:
56+
dependency-type: "development"
57+
update-types:
58+
- "minor"
59+
- "patch"
60+
61+
62+
# infra (Terraform)
63+
- package-ecosystem: "terraform"
64+
directory: "autogpt_platform/infra"
65+
schedule:
66+
interval: "weekly"
67+
open-pull-requests-limit: 5
68+
target-branch: "dev"
69+
groups:
70+
production-dependencies:
71+
dependency-type: "production"
72+
update-types:
73+
- "minor"
74+
- "patch"
75+
development-dependencies:
76+
dependency-type: "development"
77+
update-types:
78+
- "minor"
79+
- "patch"
80+
81+
82+
# market (Poetry project)
83+
- package-ecosystem: "pip"
84+
directory: "autogpt_platform/market"
85+
schedule:
86+
interval: "weekly"
87+
open-pull-requests-limit: 10
88+
target-branch: "dev"
89+
groups:
90+
production-dependencies:
91+
dependency-type: "production"
92+
update-types:
93+
- "minor"
94+
- "patch"
95+
development-dependencies:
96+
dependency-type: "development"
97+
update-types:
98+
- "minor"
99+
- "patch"
100+
101+
102+
# GitHub Actions
103+
- package-ecosystem: "github-actions"
104+
directory: "/"
105+
schedule:
106+
interval: "weekly"
107+
open-pull-requests-limit: 5
108+
target-branch: "dev"
109+
groups:
110+
production-dependencies:
111+
dependency-type: "production"
112+
update-types:
113+
- "minor"
114+
- "patch"
115+
development-dependencies:
116+
dependency-type: "development"
117+
update-types:
118+
- "minor"
119+
- "patch"
120+
121+
122+
# Docker
123+
- package-ecosystem: "docker"
124+
directory: "autogpt_platform/"
125+
schedule:
126+
interval: "weekly"
127+
open-pull-requests-limit: 5
128+
target-branch: "dev"
129+
groups:
130+
production-dependencies:
131+
dependency-type: "production"
132+
update-types:
133+
- "minor"
134+
- "patch"
135+
development-dependencies:
136+
dependency-type: "development"
137+
update-types:
138+
- "minor"
139+
- "patch"
140+
141+
142+
# Submodules
143+
- package-ecosystem: "gitsubmodule"
144+
directory: "autogpt_platform/supabase"
145+
schedule:
146+
interval: "weekly"
147+
open-pull-requests-limit: 1
148+
target-branch: "dev"
149+
groups:
150+
production-dependencies:
151+
dependency-type: "production"
152+
update-types:
153+
- "minor"
154+
- "patch"
155+
development-dependencies:
156+
dependency-type: "development"
157+
update-types:
158+
- "minor"
159+
- "patch"
160+
161+
162+
# Docs
163+
- package-ecosystem: 'pip'
164+
directory: "docs/"
165+
schedule:
166+
interval: "weekly"
167+
open-pull-requests-limit: 1
168+
target-branch: "dev"
169+
groups:
170+
production-dependencies:
171+
dependency-type: "production"
172+
update-types:
173+
- "minor"
174+
- "patch"
175+
development-dependencies:
176+
dependency-type: "development"
177+
update-types:
178+
- "minor"
179+
- "patch"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: AutoGPT Platform - Build, Push, and Deploy Dev Environment
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
paths:
7+
- 'autogpt_platform/backend/**'
8+
- 'autogpt_platform/frontend/**'
9+
- 'autogpt_platform/market/**'
10+
11+
permissions:
12+
contents: 'read'
13+
id-token: 'write'
14+
15+
env:
16+
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
17+
GKE_CLUSTER: dev-gke-cluster
18+
GKE_ZONE: us-central1-a
19+
NAMESPACE: dev-agpt
20+
21+
jobs:
22+
build-push-deploy:
23+
name: Build, Push, and Deploy
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
32+
- id: 'auth'
33+
uses: 'google-github-actions/auth@v1'
34+
with:
35+
workload_identity_provider: 'projects/638488734936/locations/global/workloadIdentityPools/dev-pool/providers/github'
36+
service_account: 'dev-github-actions-sa@agpt-dev.iam.gserviceaccount.com'
37+
token_format: 'access_token'
38+
create_credentials_file: true
39+
40+
- name: 'Set up Cloud SDK'
41+
uses: 'google-github-actions/setup-gcloud@v1'
42+
43+
- name: 'Configure Docker'
44+
run: |
45+
gcloud auth configure-docker us-east1-docker.pkg.dev
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v1
49+
50+
- name: Cache Docker layers
51+
uses: actions/cache@v2
52+
with:
53+
path: /tmp/.buildx-cache
54+
key: ${{ runner.os }}-buildx-${{ github.sha }}
55+
restore-keys: |
56+
${{ runner.os }}-buildx-
57+
58+
- name: Check for changes
59+
id: check_changes
60+
run: |
61+
git fetch origin dev
62+
BACKEND_CHANGED=$(git diff --name-only origin/dev HEAD | grep "^autogpt_platform/backend/" && echo "true" || echo "false")
63+
FRONTEND_CHANGED=$(git diff --name-only origin/dev HEAD | grep "^autogpt_platform/frontend/" && echo "true" || echo "false")
64+
MARKET_CHANGED=$(git diff --name-only origin/dev HEAD | grep "^autogpt_platform/market/" && echo "true" || echo "false")
65+
echo "backend_changed=$BACKEND_CHANGED" >> $GITHUB_OUTPUT
66+
echo "frontend_changed=$FRONTEND_CHANGED" >> $GITHUB_OUTPUT
67+
echo "market_changed=$MARKET_CHANGED" >> $GITHUB_OUTPUT
68+
69+
- name: Get GKE credentials
70+
uses: 'google-github-actions/get-gke-credentials@v1'
71+
with:
72+
cluster_name: ${{ env.GKE_CLUSTER }}
73+
location: ${{ env.GKE_ZONE }}
74+
75+
- name: Build and Push Backend
76+
if: steps.check_changes.outputs.backend_changed == 'true'
77+
uses: docker/build-push-action@v2
78+
with:
79+
context: .
80+
file: ./autogpt_platform/backend/Dockerfile
81+
push: true
82+
tags: us-east1-docker.pkg.dev/agpt-dev/agpt-backend-dev/agpt-backend-dev:${{ github.sha }}
83+
cache-from: type=local,src=/tmp/.buildx-cache
84+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
85+
86+
- name: Build and Push Frontend
87+
if: steps.check_changes.outputs.frontend_changed == 'true'
88+
uses: docker/build-push-action@v2
89+
with:
90+
context: .
91+
file: ./autogpt_platform/frontend/Dockerfile
92+
push: true
93+
tags: us-east1-docker.pkg.dev/agpt-dev/agpt-frontend-dev/agpt-frontend-dev:${{ github.sha }}
94+
cache-from: type=local,src=/tmp/.buildx-cache
95+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
96+
97+
- name: Build and Push Market
98+
if: steps.check_changes.outputs.market_changed == 'true'
99+
uses: docker/build-push-action@v2
100+
with:
101+
context: .
102+
file: ./autogpt_platform/market/Dockerfile
103+
push: true
104+
tags: us-east1-docker.pkg.dev/agpt-dev/agpt-market-dev/agpt-market-dev:${{ github.sha }}
105+
cache-from: type=local,src=/tmp/.buildx-cache
106+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
107+
108+
- name: Move cache
109+
run: |
110+
rm -rf /tmp/.buildx-cache
111+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
112+
113+
- name: Set up Helm
114+
uses: azure/setup-helm@v1
115+
with:
116+
version: v3.4.0
117+
118+
- name: Deploy Backend
119+
if: steps.check_changes.outputs.backend_changed == 'true'
120+
run: |
121+
helm upgrade autogpt-server ./autogpt-server \
122+
--namespace ${{ env.NAMESPACE }} \
123+
-f autogpt-server/values.yaml \
124+
-f autogpt-server/values.dev.yaml \
125+
--set image.tag=${{ github.sha }}
126+
127+
- name: Deploy Websocket
128+
if: steps.check_changes.outputs.backend_changed == 'true'
129+
run: |
130+
helm upgrade autogpt-websocket-server ./autogpt-websocket-server \
131+
--namespace ${{ env.NAMESPACE }} \
132+
-f autogpt-websocket-server/values.yaml \
133+
-f autogpt-websocket-server/values.dev.yaml \
134+
--set image.tag=${{ github.sha }}
135+
136+
- name: Deploy Market
137+
if: steps.check_changes.outputs.market_changed == 'true'
138+
run: |
139+
helm upgrade autogpt-market ./autogpt-market \
140+
--namespace ${{ env.NAMESPACE }} \
141+
-f autogpt-market/values.yaml \
142+
-f autogpt-market/values.dev.yaml \
143+
--set image.tag=${{ github.sha }}
144+
145+
- name: Deploy Frontend
146+
if: steps.check_changes.outputs.frontend_changed == 'true'
147+
run: |
148+
helm upgrade autogpt-builder ./autogpt-builder \
149+
--namespace ${{ env.NAMESPACE }} \
150+
-f autogpt-builder/values.yaml \
151+
-f autogpt-builder/values.dev.yaml \
152+
--set image.tag=${{ github.sha }}

.github/workflows/platform-frontend-ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,27 @@ jobs:
3939
runs-on: ubuntu-latest
4040

4141
steps:
42+
- name: Free Disk Space (Ubuntu)
43+
uses: jlumbroso/free-disk-space@main
44+
with:
45+
# this might remove tools that are actually needed,
46+
# if set to "true" but frees about 6 GB
47+
tool-cache: false
48+
49+
# all of these default to true, but feel free to set to
50+
# "false" if necessary for your workflow
51+
android: false
52+
dotnet: false
53+
haskell: false
54+
large-packages: true
55+
docker-images: true
56+
swap-storage: true
57+
4258
- name: Checkout repository
4359
uses: actions/checkout@v4
4460
with:
4561
submodules: recursive
62+
4663
- name: Set up Node.js
4764
uses: actions/setup-node@v4
4865
with:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Repo - Enforce dev as base branch
2+
on:
3+
pull_request_target:
4+
branches: [ master ]
5+
types: [ opened ]
6+
7+
jobs:
8+
check_pr_target:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
steps:
13+
- name: Check if PR is from dev or hotfix
14+
if: ${{ !(startsWith(github.event.pull_request.head.ref, 'hotfix/') || github.event.pull_request.head.ref == 'dev') }}
15+
run: |
16+
gh pr comment ${{ github.event.number }} --repo "$REPO" \
17+
--body $'This PR targets the `master` branch but does not come from `dev` or a `hotfix/*` branch.\n\nAutomatically setting the base branch to `dev`.'
18+
gh pr edit ${{ github.event.number }} --base dev --repo "$REPO"
19+
env:
20+
GITHUB_TOKEN: ${{ github.token }}
21+
REPO: ${{ github.repository }}

0 commit comments

Comments
 (0)