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

Feature/act #26

Open
wants to merge 3 commits into
base: main
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
20 changes: 20 additions & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: test
env:
GITHUB_PAT: ${{ secrets.PAT }}
GITHUB_1: ${{ secrets.PAT }}
DOCKERTEST: ${{ secrets.DOCKER }}
run: echo pat ${{ secrets.PAT }} docker ${{ secrets.DOCKER }} and test1 ${DOCKERTEST} and $GITHUB_1
- name: test2
env:
GITHUB_PAT: ${{ secrets.PAT }}
run: docker-compose -e GIHUB_PAT="${{ secrets.PAT }}" up
39 changes: 31 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,56 @@ on:
pull_request:
branches: [ "main" ]
jobs:
build:
python-package-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: [
#"3.10",
"3.x"]
steps:


- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@master
with:
submodules: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
#- name: Set up Python ${{ matrix.python-version }}
#3 uses: actions/setup-python@v3
# with:
# architecture: x64
# python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
#python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install podman-compose
#- name: Lint with flake8
# run: |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Docker Compose Action
uses: isbang/compose-action@v1.5.1
- name: Docker Compose Action build
#uses: meta-introspector/compose-action@main
env:
GITHUB_PAT: ${{ secrets.PAT }}
GITHUB_REPO: "jmikedupont2/ai-ticket"
run: docker-compose build

- name: Docker Compose Action echo
env:
GITHUB_PAT: ${{ secrets.PAT }}
GITHUB_REPO: "jmikedupont2/ai-ticket"
run: echo pat ${{ secrets.PAT }}
# run: echo docker-compose up -e GITHUB_PAT=${{ secrets.PAT }} -e GITHUB_REPO="jmikedupont2/ai-ticket"

- name: Docker Compose Action do it
#uses: meta-introspector/compose-action@main
env:
GITHUB_PAT: ${{ secrets.PAT }}
GITHUB_REPO: "jmikedupont2/ai-ticket"
run: |
GITHUB_PAT=${{ secrets.PAT }} GITHUB_REPO="jmikedupont2/ai-ticket" docker-compose up

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,6 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

*~
*~
/dckr_pat_.txt
/github_pat.txt
4 changes: 4 additions & 0 deletions .secrets.example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GITHUB_TOKEN=
GITHUB_PAT=
PAT=this isused
DOCKER=
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
bash ./runact.sh
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: '3'
services:

ai_ticket:
image: ai_ticket
build:
context: .
#image: ai_ticket
build: .
# context: .
#entrypoint: /bin/bash
#stdin_open: true # docker run -i
#tty: true # docker run -t

autogpt:
entrypoint: bash -c "poetry run pip install /opt/ai-ticket && poetry run autogpt --install-plugin-deps --skip-news -y"
entrypoint: bash -c "poetry run pip install /opt/ai-ticket && poetry run autogpt --install-plugin-deps --skip-news -y --ai-name 'meta-autogpt' --ai-role 'you will introspect autogpt and reveal its internals via reflection and comprehension' --ai-goal 'Observe your behaviour' --ai-goal 'Reflect over your outcomes' --ai-goal 'Orient yourself to your knowledge' --ai-goal 'Decide on your next step' --ai-goal 'Act on your chosen next experiment' "

# uncomment thse next 3 lines for debugging
#entrypoint: /bin/bash
Expand All @@ -24,6 +24,7 @@ services:
build:
context: vendor/Auto-GPT/
depends_on:
- ai_ticket
- mockopenai

mockopenai:
Expand Down
14 changes: 14 additions & 0 deletions runact.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#prerequists
# git clone https://github.com/nektos/act -> https://github.com/meta-introspector/actx
# make build


# git clone https://github.com/moovweb/gvm
# cd gvm/ &&./autogen.sh && make install
# use .secrets PAT And DOCKER
act -P ubuntu-latest=localhost/my_local_act \
--verbose \
--job python-package-build

# --pull=false \
Loading