From da9c289a1c51b3cafeec67f75018c11a17da664e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 22:31:53 +0000 Subject: [PATCH 1/3] Initial plan From 9794bc323cdc8a509c10cebec167ecaca968ab90 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 22:34:53 +0000 Subject: [PATCH 2/3] feat: add ollama-action GitHub Actions workflow for LLM automation Co-authored-by: syed-reza98 <71028588+syed-reza98@users.noreply.github.com> --- .github/workflows/ollama-action.yml | 56 +++++++++++++++++++++++++++++ .gitignore | 3 ++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/ollama-action.yml diff --git a/.github/workflows/ollama-action.yml b/.github/workflows/ollama-action.yml new file mode 100644 index 00000000..b73c17eb --- /dev/null +++ b/.github/workflows/ollama-action.yml @@ -0,0 +1,56 @@ +name: ollama-action + +on: + workflow_dispatch: + inputs: + model: + description: 'Ollama model name (e.g. llama3.2, tinyllama)' + required: false + default: 'llama3.2' + prompt: + description: 'Prompt to run' + required: false + default: 'Summarize recent changes in this repository.' + version: + description: 'Optional Ollama version to install (e.g. 0.15.0)' + required: false + default: '' + cache: + description: 'Whether to cache the model (true/false)' + required: false + default: 'true' + push: + branches: + - main + +permissions: + contents: read + +jobs: + run-ollama: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run Ollama (ai-action/ollama-action) + id: ollama + uses: ai-action/ollama-action@v2 + with: + model: ${{ github.event.inputs.model || 'llama3.2' }} + prompt: ${{ github.event.inputs.prompt || 'Summarize recent changes in this repository.' }} + version: ${{ github.event.inputs.version }} + cache: ${{ github.event.inputs.cache || 'true' }} + + - name: Print Ollama response + run: | + echo "=== Ollama response ===" + echo "$response" + env: + response: ${{ steps.ollama.outputs.response }} + + - name: Save response to file + run: | + mkdir -p .github + printf "%s\n" "$response" > .github/ollama-response.txt + env: + response: ${{ steps.ollama.outputs.response }} diff --git a/.gitignore b/.gitignore index 07bf113b..45b6e784 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,6 @@ dev-session*.log security-test-results.json # Screenshots from browser automation *.png + +# Ollama action generated response +.github/ollama-response.txt From e6a030f1302e8f8d8846c0d98eaf2145a45acf12 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 22:52:56 +0000 Subject: [PATCH 3/3] fix: add timeout-minutes, use printf and sanitize :: in log output Co-authored-by: syed-reza98 <71028588+syed-reza98@users.noreply.github.com> --- .github/workflows/ollama-action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ollama-action.yml b/.github/workflows/ollama-action.yml index b73c17eb..24e32787 100644 --- a/.github/workflows/ollama-action.yml +++ b/.github/workflows/ollama-action.yml @@ -29,6 +29,7 @@ permissions: jobs: run-ollama: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@v4 @@ -43,8 +44,8 @@ jobs: - name: Print Ollama response run: | - echo "=== Ollama response ===" - echo "$response" + printf '%s\n' "=== Ollama response ===" + printf '%s\n' "$response" | sed 's/^::/\x200::/' env: response: ${{ steps.ollama.outputs.response }}