Compare commits

..

17 Commits

Author SHA1 Message Date
407bc397c2 - use replace function
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 35s
continuous-integration/drone/push Build is failing
2025-03-07 18:36:43 -05:00
50877c6425 - use brackets
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 36s
continuous-integration/drone/push Build is failing
2025-03-07 17:57:14 -05:00
e2bb4633e4 - use regex
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 1m7s
continuous-integration/drone/push Build is failing
2025-03-07 16:43:05 -05:00
a30d873527 - fix tea install
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 56s
continuous-integration/drone/push Build is failing
2025-03-07 16:16:54 -05:00
259119ee02 - add tea login
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Failing after 1m25s
continuous-integration/drone/push Build is failing
2025-03-07 16:12:53 -05:00
8f0552bdf0 - add ./
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Failing after 1m26s
continuous-integration/drone/push Build is failing
2025-03-07 16:03:51 -05:00
a0bae9717f - add tea executable
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Failing after 1m5s
continuous-integration/drone/push Build is failing
2025-03-07 15:50:46 -05:00
6c64bed454 - use tea cli
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Failing after 43s
continuous-integration/drone/push Build is failing
2025-03-07 15:42:24 -05:00
6d39e12493 - move cli to diferent step
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 54s
continuous-integration/drone/push Build is failing
2025-03-07 15:36:45 -05:00
788781d077 - add gitea cli install step
Some checks failed
Ollama Review / test-action (pull_request) Successful in 46s
continuous-integration/drone/push Build is failing
2025-03-07 15:32:45 -05:00
333d87c62f - add manual steps to code review using ollama
Some checks failed
Ollama Review / test-action (pull_request) Failing after 1m46s
continuous-integration/drone/push Build is failing
2025-03-07 15:05:05 -05:00
325fbff1e6 - use synchronize trigger
Some checks failed
Ollama Review / test-action (pull_request) Failing after 2m27s
continuous-integration/drone/push Build is failing
2025-03-07 14:40:36 -05:00
0b2d82f448 - change trigger to edited
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-07 14:35:43 -05:00
2d3bdad800 - add ollama pipeline review
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-07 14:28:48 -05:00
05f3ab1f14 - remove pull_request trigger
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-07 14:18:39 -05:00
43ea42397f add some conditional deploy syntax
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build was killed
2025-03-07 13:54:22 -05:00
1003b27e95 - working on appointments block
(cherry picked from commit 7a010a4f8e0362b0f344e8fe5cf8df58f2cf5e65)
2025-03-05 14:22:30 -05:00
5 changed files with 113 additions and 55 deletions

View File

@ -40,8 +40,28 @@ steps:
volumes: volumes:
- name: docker_sock - name: docker_sock
path: /var/run/docker.sock path: /var/run/docker.sock
- name: Build and Push Container Image - name: Build and Push (PR) Container Image
image: plugins/docker image: plugins/docker
when:
branch:
- feature/*
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: gitea.bsidesolutions.net/oonyeje/oonyeje-portfolio
registry: gitea.bsidesolutions.net
dockerfile: ./Dockerfile
force_tag: true
tags:
- latest
- pr-build-${replace("${DRONE_BRANCH}", "/", "-")}
- name: Build and Push (Staging) Container Image
image: plugins/docker
when:
branch:
- develop
settings: settings:
username: username:
from_secret: DOCKER_USERNAME from_secret: DOCKER_USERNAME
@ -54,56 +74,33 @@ steps:
tags: tags:
- latest - latest
- dev - dev
- dev-build-${DRONE_COMMIT_SHA:0:7} - dev-${DRONE_COMMIT_SHA:0:10}
- name: Build and Push (Production) Container Image
image: plugins/docker
# - name: deploy-staging when:
# image: plugins/ansible:latest branch:
# settings: - main
# playbook: ansible/playbook.staging.yml settings:
# galaxy: ansible/requirements.yml username:
# inventory: ansible/inventory.yml from_secret: DOCKER_USERNAME
# become_user: bside password:
# user: bside from_secret: DOCKER_PASSWORD
# verbose: 4 repo: gitea.bsidesolutions.net/oonyeje/oonyeje-portfolio
# become: true registry: gitea.bsidesolutions.net
# list_tasks: true dockerfile: ./Dockerfile
# list_hosts: true force_tag: true
# private_key: tags:
# from_secret: STAGING_SERVER_PRIVATE_KEY - latest
# trigger: - release
# branch: - release-${DRONE_COMMIT_SHA:0:10}
# - master trigger:
# - prod branch:
# - qa - main
# - feature/* - develop
# event: - feature/*
# - push event:
# - pull_request include:
# --- - push
# kind: pipeline
# type: exec
# name: staging-deploy
# platform:
# os: linux
# arch: amd64
# steps:
# - name: ansible-deploy
# commands:
# - ansible --version
# - ansible-galaxy install --force --role-file ansible/requirements.yml -vvvv
# - ansible-playbook --inventory ansible/inventory.yml --list-hosts ansible/playbook.staging.yml
# trigger:
# branch:
# - master
# - prod
# - qa
# - feature/*
# event:
# - push
# - pull_request
volumes: volumes:
- name: docker_sock - name: docker_sock

View File

@ -0,0 +1,47 @@
name: 'Ollama Review'
on:
pull_request:
types: [opened, synchronize] # PR open시 자동 코드 리뷰 요청
jobs:
review-code-with-llm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v43
- name: Setup Gitea CLI
run: |
LATEST_VERSION=$(curl -s https://dl.gitea.com/tea/ | \
grep -oP '(?<=href="/tea/)[^/"]*' | \
grep -E '^[0-9]+(\.[0-9]+){1,2}$' | \
sort -V | \
tail -n 1)
curl -L https://dl.gitea.com/tea/${LATEST_VERSION}/tea-${LATEST_VERSION}-linux-amd64 -o /usr/local/bin/tea
chmod +x /usr/local/bin/tea
tea --version
tea --version
tea login add --name gitea --url ${{ gitea.server_url }} --token ${{ secrets.token }}
tea login default gitea
- name: Review code
env:
GITEA_TOKEN: ${{ secrets.token }}
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
review=$(curl -s https://ollama.bsidesolutions.net/api/generate -d '{"model": "${{ inputs.model }}", "prompt": "Review the following file:\n\n```\n$(cat $file)\n```", "stream": false}' | jq -r '.response')
comment="Ollama Code Review for \`$file\`:\n\n$review"
echo "$comment" >> ollama_review.txt
done
tea pr comment ${{ gitea.event.pull_request.number }} --body "$(cat ollama_review.txt)"
shell: bash

View File

@ -24,10 +24,6 @@ jobs:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
# - name: Login to Gitea
# run: |
# echo "${{ secrets.TOKEN }}" | docker login ${{ gitea.server_url }} --username ${{ gitea.actor }} --password-stdin
- name: Deploy to Coolify - name: Deploy to Coolify
uses: carlozanella/deploy-coolify@v1 uses: carlozanella/deploy-coolify@v1
with: with:

View File

@ -0,0 +1,16 @@
const GoogleAppointmentBlock = () => {
const {GOOGLE_APPOINTMENTS_LINK} = process.env;
console.log(GOOGLE_APPOINTMENTS_LINK)
return (
<div className='w-full h-full flex flex-row justify-center bg-white border-solid'>
<embed
src={GOOGLE_APPOINTMENTS_LINK!}
style={{border: 1}}
width="100%"
height="600"
></embed>
</div>
);
}
export default GoogleAppointmentBlock;

View File

@ -8,6 +8,7 @@ import navigationContent from '../lib/navigationContent'
import ContactForm from '@/components/form/ContactForm'; import ContactForm from '@/components/form/ContactForm';
import Footer from '@/components/footer'; import Footer from '@/components/footer';
import Link from 'next/link'; import Link from 'next/link';
import GoogleAppointmentBlock from '@/components/form/GoogleAppointmentBlock';
const inter = Inter({ subsets: ['latin'] }) const inter = Inter({ subsets: ['latin'] })
export default function Home() { export default function Home() {
@ -119,6 +120,7 @@ export default function Home() {
<div className='flex flex-row h-full w-full justify-center'> <div className='flex flex-row h-full w-full justify-center'>
<div className='flex flex-col h-full w-full justify-center'> <div className='flex flex-col h-full w-full justify-center'>
<ContactForm/> <ContactForm/>
{/* <GoogleAppointmentBlock/> */}
</div> </div>
<span className="cursor-pointer self-end" onClick={() => { <span className="cursor-pointer self-end" onClick={() => {
executeScrollToLandiing(); executeScrollToLandiing();