Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/build.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: CI

on:
push:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: yarn install

- name: Generate code
run: make gen

- name: Run checks
run: make check

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Docker runtime
uses: docker/setup-buildx-action@v3

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: yarn install

- name: Generate code
run: make gen

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
load: true
push: false
tags: local/app:latest

- name: Save image
run: docker save local/app:latest -o image.tar

- name: Upload image
uses: actions/upload-artifact@v4
with:
name: docker-image
path: image.tar
retention-days: 1

release:
runs-on: ubuntu-latest
needs: [tests, build]
if: github.ref_name == github.event.repository.default_branch
permissions:
contents: read
packages: write
steps:
- name: Download image
uses: actions/download-artifact@v4
with:
name: docker-image

- name: Set up Docker runtime
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Load image
run: docker load -i image.tar

- name: Set image name
run: echo "IMAGE_NAME=ghcr.io/hyperleda/hyperleda-webapp" >> "$GITHUB_ENV"

- name: Set short SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> "$GITHUB_ENV"

- name: Push image
run: |
docker tag local/app:latest ${{ env.IMAGE_NAME }}:${{ env.SHORT_SHA }}
docker tag local/app:latest ${{ env.IMAGE_NAME }}:latest
docker push ${{ env.IMAGE_NAME }}:${{ env.SHORT_SHA }}
docker push ${{ env.IMAGE_NAME }}:latest
49 changes: 0 additions & 49 deletions .github/workflows/release.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function SearchResultsPage(): ReactElement {
const [searchParams] = useSearchParams();
const navigate = useNavigate();
const query = searchParams.get("q") || "";
const page = parseInt(searchParams.get("page") || "1");
const page = parseInt(searchParams.get("page") || "0");
const pageSize = parseInt(searchParams.get("pagesize") || "25");

useEffect(() => {
Expand Down
Loading