Skip to content

Vector KQPP

Vector KQPP #33

Workflow file for this run

name: Run Vector Image Create
on:
issues:
types: [opened, edited]
jobs:
run:
runs-on: ubuntu-latest
services:
ollama:
image: ollama/ollama:latest
ports:
- 11434:11434
volumes:
- ollama_data:/root/.ollama
permissions:
contents: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Print Issue Body to words.txt
run: |
echo "${{ github.event.issue.body }}" > words.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Requirements
run: |
python -m pip install -r requirements.txt
- name: Run script
run: |
python main.py
mv 3d_plot_small.png ./img/${{ github.run_id }}.png
env:
OLLAMA_HOST: "http://localhost:11434"
- name: git commit
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git pull
git add ./img
git commit -m "Add 3D plot for run ${{ github.run_id }}"
git push
- name: Upload 3D plot
uses: actions/upload-artifact@v4
with:
name: 3D plot
path: 3d_plot_small.png
- name: Comment image on issue
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
body: |
![3D Plot](https://github.com/${{ github.repository }}/raw/${{ github.ref }}/img/${{ github.run_id }}.png)