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

cloud deployment patch #52

Open
wants to merge 2 commits into
base: v2-develop
Choose a base branch
from
Open
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
148 changes: 87 additions & 61 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
@@ -1,70 +1,96 @@
#

name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
release:
types: [created]
workflow_dispatch:
workflow_dispatch:
#push:
#pull_request:

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
#- name: Configure AWS credentials
# uses: meta-introspector/configure-aws-credentials@v4
# with:
# aws-region: ${{ secrets.AWS_REGION || 'us-east-2'}}
# role-session-name: github-actions-${{ env.APP_NAME || 'eliza'}}
# # FIXME hard coded
# role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID || '767503528736' }}:role/github

- name: Set up Docker Buildx
uses: meta-introspector/setup-buildx-action@v3.8.0
with:
install: true
platforms: linux/amd64,linux/arm/v7,linux/arm/v8

# - name: Login to Amazon ECR
# id: login-ecr
# uses: meta-introspector/amazon-ecr-login@v1

- name: Set short sha
id: sha_short
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Login to Docker Hub
uses: meta-introspector/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Checkout repository
uses: meta-introspector/checkout@v4

- name: Log in to the Container registry
uses: meta-introspector/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: meta-introspector/metadata-action@v5.5.1
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
h4ckermike/elizaos-eliza
# ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY || 'agent/eliza'}}

- name: Build and push Docker image
id: push
uses: meta-introspector/build-push-action@v6.10.0
with:
platforms: linux/arm64,linux/arm64/v8
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
- name: Generate artifact attestation
uses: meta-introspector/attest-build-provenance@local
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

# This step makes the Docker image public, so users can pull it without authentication.
- name: Make Docker image public
run: |
curl \
-X PATCH \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user/packages/container/${{ env.IMAGE_NAME }}/visibility \
-d '{"visibility":"public"}'
- name: Make Docker image public
run: |
curl \
-X PATCH \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user/packages/container/${{ env.IMAGE_NAME }}/visibility \
-d '{"visibility":"public"}'
73 changes: 34 additions & 39 deletions .github/workflows/integrationTests.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Integration Tests

on:
push:
branches:
- "*"
pull_request_target:
branches:
- "*"
workflow_dispatch:

env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand All @@ -15,36 +10,36 @@ env:

jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "23"

- name: Install required packages
run: |
sudo apt update
sudo apt -y install build-essential pkg-config libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

- name: Install dependencies
run: bun install

- name: Build packages
run: bun run build

- name: Check for API key
run: |
if [ -z "$OPENAI_API_KEY" ]; then
echo "Error: OPENAI_API_KEY is not set."
exit 1
fi

- name: Run integration tests
run: bun run test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# - name: Install Bun
# uses: oven-sh/setup-bun@v2

# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: "23"

# - name: Install required packages
# run: |
# sudo apt update
# sudo apt -y install build-essential pkg-config libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

# - name: Install dependencies
# run: bun install

# - name: Build packages
# run: bun run build

# - name: Check for API key
# run: |
# if [ -z "$OPENAI_API_KEY" ]; then
# echo "Error: OPENAI_API_KEY is not set."
# exit 1
# fi

# - name: Run integration tests
# run: bun run test
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize]
workflow_dispatch:


jobs:
check-pr-title:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/tauri-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,8 @@ env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

on:
push:
branches: [main, develop, v2-develop]
paths:
- 'packages/app/**'
- '.github/workflows/**'
pull_request:
branches: [v2-develop]
paths:
- 'packages/app/**'
- '.github/workflows/**'
workflow_dispatch:


jobs:
test-build:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: testdocker
on:
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Login to Docker Hub
uses: meta-introspector/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
id: push
uses: meta-introspector/build-push-action@v6.10.0
with:
platforms: linux/arm64,linux/arm64/v8
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


52 changes: 51 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,54 @@ lerna-debug.log
tsdoc_cache/
tsdoc_comments/

**/elizaDb/**
**/elizaDb/**# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/
dist/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile

# directory configuration
.dir-locals.el

# network security
/network-security.data

packages/autodoc/text_objects/*
/env
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[submodule "vendor/elizaos/plugin-twitter"]
path = vendor/elizaos/plugin-twitter
url = https://github.com/meta-introspector/plugin-twitter
[submodule "vendor/elizaos/agent-twitter-client"]
path = vendor/elizaos/agent-twitter-client
url = https://github.com/meta-introspector/agent-twitter-client.git
[submodule "vendor/elizaos/client-twitter"]
path = vendor/elizaos/client-twitter
url = https://github.com/meta-introspector/client-twitter-eliza-zos
[submodule "vendor/elizaos/client-discord-eliza"]
path = vendor/elizaos/client-discord-eliza
url = https://github.com/meta-introspector/client-discord-eliza-zos
[submodule "vendor/elizaos/plugin-speech-tts"]
path = vendor/elizaos/plugin-speech-tts
url = https://github.com/meta-introspector/plugin-speech-tts-eliza-zos
[submodule "vendor/elizaos/client-telegram"]
path = vendor/elizaos/client-telegram
url = https://github.com/meta-introspector/client-telegram-eliza-zos
[submodule "characters"]
path = characters
url = https://github.com/meta-introspector/characters-eliza-zos
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.3.0
v23.9.0
Loading