Compare commits
No commits in common. "main" and "0.1.1" have entirely different histories.
@ -4,86 +4,35 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-container:
|
changelog:
|
||||||
name: Build Container
|
name: Generate changelog
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Docker meta
|
- name: Checkout
|
||||||
id: meta
|
uses: actions/checkout@v4
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
with:
|
||||||
images: |
|
fetch-depth: 0
|
||||||
git.dev-null.rocks/alexohneander/gosearch
|
|
||||||
tags: |
|
|
||||||
type=schedule,pattern={{date 'YYYYMMDDHHMM'}}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
- name: Set up Docker Context for Buildx
|
- name: Generate changelog
|
||||||
id: buildx-context
|
uses: orhun/git-cliff-action@v4
|
||||||
|
with:
|
||||||
|
config: cliff.toml
|
||||||
|
args: --verbose
|
||||||
|
env:
|
||||||
|
OUTPUT: CHANGELOG.md
|
||||||
|
GITHUB_REPO: ${{ github.repository }}
|
||||||
|
|
||||||
|
- name: Commit
|
||||||
run: |
|
run: |
|
||||||
export DOCKER_HOST=tcp://docker:2376/
|
git checkout <branch>
|
||||||
export DOCKER_TLS_CERTDIR="/certs"
|
git config user.name 'github-actions[bot]'
|
||||||
export DOCKER_TLS_VERIFY=1
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
export DOCKER_CERT_PATH="/certs/client"
|
set +e
|
||||||
docker context create builders
|
git add CHANGELOG.md
|
||||||
|
git commit -m "Update changelog"
|
||||||
- name: Setup Docker Buildx
|
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git <branch>
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
# buildkitd-flags: --debug
|
|
||||||
endpoint: builders
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: "tcp://docker:2376/"
|
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
|
||||||
DOCKER_TLS_VERIFY: 1
|
|
||||||
DOCKER_CERT_PATH: "/certs/client"
|
|
||||||
|
|
||||||
- name: Login to Gitea
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.dev-null.rocks
|
|
||||||
username: ${{ gitea.actor }}
|
|
||||||
password: ${{ secrets.GA_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push the image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
file: Dockerfile
|
|
||||||
platforms: linux/amd64
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: "tcp://docker:2376/"
|
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
|
||||||
DOCKER_TLS_VERIFY: 1
|
|
||||||
DOCKER_CERT_PATH: "/certs/client"
|
|
||||||
|
|
||||||
# - name: Generate changelog
|
|
||||||
# uses: orhun/git-cliff-action@v4
|
|
||||||
# with:
|
|
||||||
# config: cliff.toml
|
|
||||||
# args: --verbose
|
|
||||||
# env:
|
|
||||||
# OUTPUT: CHANGELOG.md
|
|
||||||
# GITHUB_REPO: ${{ github.repository }}
|
|
||||||
|
|
||||||
# - name: Commit
|
|
||||||
# run: |
|
|
||||||
# git checkout <branch>
|
|
||||||
# git config user.name 'github-actions[bot]'
|
|
||||||
# git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
||||||
# set +e
|
|
||||||
# git add CHANGELOG.md
|
|
||||||
# git commit -m "Update changelog"
|
|
||||||
# git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git <branch>
|
|
@ -10,7 +10,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
renovate:
|
renovate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/renovatebot/renovate:39.264.0
|
container: ghcr.io/renovatebot/renovate:39.216.1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: renovate
|
- run: renovate
|
||||||
|
20
CHANGELOG.md
20
CHANGELOG.md
@ -2,33 +2,15 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [0.1.1] - 2025-03-26
|
## [unreleased]
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
|
||||||
- *(index)* Add save and load functionality for Index using gob encoding/decoding
|
- *(index)* Add save and load functionality for Index using gob encoding/decoding
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
|
||||||
|
|
||||||
- Updated AddDocToIndex function to ignore additional special characters in scanner.Text()
|
|
||||||
- Add sonarqube properties
|
|
||||||
- Add default log level
|
|
||||||
|
|
||||||
### 🚜 Refactor
|
|
||||||
|
|
||||||
- Search logic to improve performance and reduce false positives by making query case-insensitive for simple queries and using trimmed whitespace in phrases
|
|
||||||
|
|
||||||
### 📚 Documentation
|
### 📚 Documentation
|
||||||
|
|
||||||
- Add first release in Changelog
|
- Add first release in Changelog
|
||||||
- Update changelog
|
|
||||||
- Add sonarqube badge
|
|
||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
|
||||||
|
|
||||||
- Add sonarqube pipeline
|
|
||||||
- Update sonarqube pipeline
|
|
||||||
- Add quality gate
|
|
||||||
|
|
||||||
## [0.1.0] - 2025-03-25
|
## [0.1.0] - 2025-03-25
|
||||||
|
|
||||||
|
26
Dockerfile
26
Dockerfile
@ -1,26 +0,0 @@
|
|||||||
# Use the official Golang image for building
|
|
||||||
FROM golang:1.24 AS builder
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
# Copy Go modules and dependencies
|
|
||||||
COPY go.mod go.sum ./
|
|
||||||
RUN go mod download
|
|
||||||
# Copy source code
|
|
||||||
COPY . .
|
|
||||||
# Build the application
|
|
||||||
RUN go build -o gosearch .
|
|
||||||
|
|
||||||
# Use a minimal base image for final deployment
|
|
||||||
FROM alpine:3.22
|
|
||||||
# Set working directory in the container
|
|
||||||
WORKDIR /
|
|
||||||
# Copy the built binary from the builder stage
|
|
||||||
COPY --from=builder /app/gosearch .
|
|
||||||
# Add executing User
|
|
||||||
RUN addgroup gosearch \
|
|
||||||
&& useradd -g gosearch gosearch
|
|
||||||
USER gosearch
|
|
||||||
# Expose the application port
|
|
||||||
EXPOSE 3000
|
|
||||||
# Run the application
|
|
||||||
CMD ["./gosearch"]
|
|
@ -1,9 +1,7 @@
|
|||||||
[](https://sonar.dev-null.rocks/dashboard?id=gosearch)
|
|
||||||
[](https://sonar.dev-null.rocks/dashboard?id=gosearch)
|
|
||||||
[](https://sonar.dev-null.rocks/dashboard?id=gosearch)
|
|
||||||
|
|
||||||
# gosearch
|
# gosearch
|
||||||
|
|
||||||
|
[](https://sonar.dev-null.rocks/dashboard?id=gosearch)
|
||||||
|
|
||||||
### Diagram of the Architecture
|
### Diagram of the Architecture
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
|
2
go.mod
2
go.mod
@ -2,7 +2,7 @@ module git.dev-null.rocks/alexohneander/gosearch
|
|||||||
|
|
||||||
go 1.23.5
|
go 1.23.5
|
||||||
|
|
||||||
require github.com/gofiber/fiber/v2 v2.52.8
|
require github.com/gofiber/fiber/v2 v2.52.6
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||||
|
2
go.sum
2
go.sum
@ -2,8 +2,6 @@ github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7X
|
|||||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
||||||
github.com/gofiber/fiber/v2 v2.52.6 h1:Rfp+ILPiYSvvVuIPvxrBns+HJp8qGLDnLJawAu27XVI=
|
github.com/gofiber/fiber/v2 v2.52.6 h1:Rfp+ILPiYSvvVuIPvxrBns+HJp8qGLDnLJawAu27XVI=
|
||||||
github.com/gofiber/fiber/v2 v2.52.6/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
|
github.com/gofiber/fiber/v2 v2.52.6/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
|
||||||
github.com/gofiber/fiber/v2 v2.52.8 h1:xl4jJQ0BV5EJTA2aWiKw/VddRpHrKeZLF0QPUxqn0x4=
|
|
||||||
github.com/gofiber/fiber/v2 v2.52.8/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
|
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user