Skip to content
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
42 changes: 0 additions & 42 deletions .github/workflows/release.yaml

This file was deleted.

78 changes: 39 additions & 39 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,46 +43,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
id: gauth
with:
token_format: access_token
project_id: dengenlabs
service_account: gar-pusher@dengenlabs.iam.gserviceaccount.com
workload_identity_provider: projects/265888598630/locations/global/workloadIdentityPools/composable-cloud/providers/github
access_token_lifetime: 300s
create_credentials_file: true
# - name: Authenticate with Google Cloud
# uses: google-github-actions/auth@v2
# id: gauth
# with:
# token_format: access_token
# project_id: dengenlabs
# service_account: gar-pusher@dengenlabs.iam.gserviceaccount.com
# workload_identity_provider: projects/265888598630/locations/global/workloadIdentityPools/composable-cloud/providers/github
# access_token_lifetime: 300s
# create_credentials_file: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
us.gcr.io/dengenlabs/agents/vertesia/github-agent
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long,prefix=
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# # list of Docker images to use as base name for tags
# images: |
# us.gcr.io/dengenlabs/agents/vertesia/github-agent
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=sha,format=long,prefix=

- name: Login to GAR
uses: docker/login-action@v3
with:
registry: us.gcr.io
username: oauth2accesstoken
password: ${{ steps.gauth.outputs.access_token }}
# - name: Login to GAR
# uses: docker/login-action@v3
# with:
# registry: us.gcr.io
# username: oauth2accesstoken
# password: ${{ steps.gauth.outputs.access_token }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./apps/github-agent/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secret-files: |
"gcp=${{ steps.gauth.outputs.credentials_file_path }}"
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./apps/github-agent/Dockerfile
# push: ${{ github.ref == 'refs/heads/main' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# secret-files: |
# "gcp=${{ steps.gauth.outputs.credentials_file_path }}"
20 changes: 10 additions & 10 deletions apps/github-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
FROM node:23.5-slim AS base
FROM node:22-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
COPY . /workspace
WORKDIR /workspace/apps/github-agent

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
RUN pnpm run -r build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this because the build script is not available at the top level of the workspace


FROM base
RUN apt-get update -y && \
apt-get install -y openssl ca-certificates

COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/lib /app/lib
COPY --from=build /app/bin /app/bin
COPY --from=prod-deps /workspace/node_modules /workspace/node_modules
COPY --from=build /workspace/apps/github-agent/lib /workspace/apps/github-agent/lib
COPY --from=build /workspace/apps/github-agent/bin /workspace/apps/github-agent/bin

COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
COPY --from=datadog/serverless-init:1 /datadog-init /workspace/datadog-init

ENV SERVICE_NAME=vertesia_github-agent

ENTRYPOINT ["/app/datadog-init"]
CMD [ "pnpm", "start" ]
ENTRYPOINT ["/workspace/datadog-init"]
CMD ["pnpm", "start"]