diff --git a/.github/workflows/genai-investigator.yml b/.github/workflows/genai-investigator.yml index 084830b16a..3d55e587b3 100644 --- a/.github/workflows/genai-investigator.yml +++ b/.github/workflows/genai-investigator.yml @@ -11,6 +11,12 @@ permissions: contents: read actions: read pull-requests: write +env: + # Configure default GenAIScript models + # using Ollama's models + GENAISCRIPT_DEFAULT_MODEL: ollama:qwen2.5-coder:7b + GENAISCRIPT_DEFAULT_SMALL_MODEL: ollama:qwen2.5-coder:1.5b + GENAISCRIPT_DEFAULT_VISION_MODEL: ollama:llama3.2-vision:11b jobs: investigate: # Only run this job if the workflow run concluded with a failure @@ -29,27 +35,23 @@ jobs: - run: yarn install --frozen-lockfile - name: compile run: yarn compile + # + # Start Ollama in a docker container + # + - name: start ollama + run: docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama - name: genaiscript gai run: node packages/cli/built/genaiscript.cjs run gai -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} - OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} - name: genaiscript github-agent run: node packages/cli/built/genaiscript.cjs run github-agent -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} - OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} - name: genaiscript github-one run: node packages/cli/built/genaiscript.cjs run github-one -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} - OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} diff --git a/.github/workflows/genai-issue-review.yml b/.github/workflows/genai-issue-review.yml index 193892fc1a..b6ee015d7e 100644 --- a/.github/workflows/genai-issue-review.yml +++ b/.github/workflows/genai-issue-review.yml @@ -5,6 +5,12 @@ on: concurrency: group: issues-${{ github.event.issue.number }} cancel-in-progress: true +env: + # Configure default GenAIScript models + # using Ollama's models + GENAISCRIPT_DEFAULT_MODEL: ollama:qwen2.5-coder:7b + GENAISCRIPT_DEFAULT_SMALL_MODEL: ollama:qwen2.5-coder:1.5b + GENAISCRIPT_DEFAULT_VISION_MODEL: ollama:llama3.2-vision:11b jobs: build: runs-on: ubuntu-latest @@ -26,7 +32,7 @@ jobs: - name: start ollama run: docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama - name: genaiscript issue-review - run: node packages/cli/built/genaiscript.cjs run issue-reviewer -prc --out-trace $GITHUB_STEP_SUMMARY --model ollama:qwen2.5-coder:7b + run: node packages/cli/built/genaiscript.cjs run issue-reviewer -prc --out-trace $GITHUB_STEP_SUMMARY env: - GITHUB_ISSUE: ${{ github.event.issue.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_ISSUE: ${{ github.event.issue.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/genai-pr-commit-review.yml b/.github/workflows/genai-pr-commit-review.yml index e832238ff2..daaf097471 100644 --- a/.github/workflows/genai-pr-commit-review.yml +++ b/.github/workflows/genai-pr-commit-review.yml @@ -7,6 +7,12 @@ on: - "packages/core/**/*" - "packages/cli/**/*" - "packages/samples/**/*" +env: + # Configure default GenAIScript models + # using Ollama's models + GENAISCRIPT_DEFAULT_MODEL: ollama:qwen2.5-coder:7b + GENAISCRIPT_DEFAULT_SMALL_MODEL: ollama:qwen2.5-coder:1.5b + GENAISCRIPT_DEFAULT_VISION_MODEL: ollama:llama3.2-vision:11b jobs: build: runs-on: ubuntu-latest @@ -31,7 +37,7 @@ jobs: - name: git stuff run: git fetch origin && git pull origin main:main - name: genaiscript pr-review-commit - run: node packages/cli/built/genaiscript.cjs run pr-review-commit --out ./temp/genai/pr-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY --model ollama:qwen2.5-coder:7b + run: node packages/cli/built/genaiscript.cjs run pr-review-commit --out ./temp/genai/pr-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/genai-pr-docs-commit-review.yml b/.github/workflows/genai-pr-docs-commit-review.yml index 83db5896bd..7269fbca66 100644 --- a/.github/workflows/genai-pr-docs-commit-review.yml +++ b/.github/workflows/genai-pr-docs-commit-review.yml @@ -4,6 +4,12 @@ on: paths: - docs/**/*.md - docs/**/*.mdx +env: + # Configure default GenAIScript models + # using Ollama's models + GENAISCRIPT_DEFAULT_MODEL: ollama:qwen2.5-coder:7b + GENAISCRIPT_DEFAULT_SMALL_MODEL: ollama:qwen2.5-coder:1.5b + GENAISCRIPT_DEFAULT_VISION_MODEL: ollama:llama3.2-vision:11b jobs: build: runs-on: ubuntu-latest @@ -26,7 +32,7 @@ jobs: - name: git stuff run: git fetch origin && git pull origin main:main - name: genaiscript pr-review-commit - run: node packages/cli/built/genaiscript.cjs run pr-docs-review-commit --out ./temp/genai/pr-docs-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY --model ollama:qwen2.5-coder:7b + run: node packages/cli/built/genaiscript.cjs run pr-docs-review-commit --out ./temp/genai/pr-docs-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/genai-pr-review.yml b/.github/workflows/genai-pr-review.yml index d254907fbd..0d7dad11ee 100644 --- a/.github/workflows/genai-pr-review.yml +++ b/.github/workflows/genai-pr-review.yml @@ -11,6 +11,12 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + # Configure default GenAIScript models + # using Ollama's models + GENAISCRIPT_DEFAULT_MODEL: ollama:qwen2.5-coder:7b + GENAISCRIPT_DEFAULT_SMALL_MODEL: ollama:qwen2.5-coder:1.5b + GENAISCRIPT_DEFAULT_VISION_MODEL: ollama:llama3.2-vision:11b jobs: build: runs-on: ubuntu-latest @@ -34,11 +40,11 @@ jobs: run: git fetch origin && git pull origin main:main - name: genaiscript pr-describe continue-on-error: true - run: node packages/cli/built/genaiscript.cjs run pr-describe --out ./temp/genai/pr-describe -prd --out-trace $GITHUB_STEP_SUMMARY --model ollama:qwen2.5-coder:7b + run: node packages/cli/built/genaiscript.cjs run pr-describe --out ./temp/genai/pr-describe -prd --out-trace $GITHUB_STEP_SUMMARY env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: genaiscript pr-review - run: node packages/cli/built/genaiscript.cjs run pr-review --out ./temp/genai/pr-review -prc --out-trace $GITHUB_STEP_SUMMARY --model ollama:qwen2.5-coder:7b + run: node packages/cli/built/genaiscript.cjs run pr-review --out ./temp/genai/pr-review -prc --out-trace $GITHUB_STEP_SUMMARY continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}