Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change docker and workflows #241

Merged
merged 4 commits into from
May 7, 2023
Merged
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
16 changes: 0 additions & 16 deletions .github/workflows/code_style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,8 @@ jobs:
with:
python-version: 3.8

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install Python dependencies
run: pip install black nbqa

- name: Install JavaScript dependencies
run: |
cd frontend
npm install
npm install -g eslint eslint-config-next @babel/core @babel/eslint-parser

- name: Run Black on Python files
run: black --check $(find . -type f -name "*.py")

- name: Run ESLint on JavaScript files
run: |
cd frontend
npx eslint .
56 changes: 8 additions & 48 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Docker Build

on:
schedule:
- cron: '42 7 * * *'
- cron: "42 7 * * *"
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-backend:
build:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -29,7 +29,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6
with:
cosign-release: 'v1.11.0'
cosign-release: "v1.11.0"

- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
Expand All @@ -46,56 +46,16 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile-backend
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata for frontend
id: meta-frontend
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend

- name: Build and push frontend Docker image
id: build-and-push-frontend
uses: docker/build-push-action@v4
with:
context: ./frontend
file: ./frontend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 0 additions & 2 deletions AgentLLM.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def task_creation_agent(
task=self.primary_objective,
commands_enabled=False,
prompt="task",
objective=self.primary_objective,
result=result,
task_description=task_description,
tasks=", ".join(task_list),
Expand All @@ -277,7 +276,6 @@ def prioritization_agent(self):
task=self.primary_objective,
commands_enabled=False,
prompt="priority",
objective=self.primary_objective,
tasks=", ".join(task_names),
next_task_id=next_task_id,
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
backend:
build:
context: .
dockerfile: Dockerfile-backend
dockerfile: Dockerfile
init: true
env_file:
- .env
Expand Down