Skip to content

fix: granian install #243

fix: granian install

fix: granian install #243

Workflow file for this run

name: build-ghcr
on:
push:
branches:
- main
paths:
- 'src/**'
- 'out/**'
- 'Dockerfile'
- '.github/workflows/build-ghcr.yml'
workflow_dispatch:
env:
TEST_TAG: ghcr.io/privau/searxng:test
GITHUB_LATEST_TAG: ghcr.io/privau/searxng:latest
DOCKER_HUB_LATEST_TAG: vojkovic/searxng:latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: vojkovic
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Test Main Image
uses: docker/build-push-action@v6
with:
load: true
context: ./
file: ./Dockerfile
tags: ${{ env.TEST_TAG }}
- name: Test Main Image
run: |
docker run -d -p 8080:8080 -e AUTHORIZED_API=test_api_key --name searxng-test ${{ env.TEST_TAG }}
sleep 15
curl -fsS http://localhost:8080/healthz | grep "OK"
curl -fsS "http://localhost:8080/search?q=github" | grep "sidebar-end-collapsible"
curl -fsS \
-H "Authorization: Basic $(printf 'user:test_api_key' | base64 | tr -d '\n')" \
"http://localhost:8080/search?q=github&format=json" | grep '"query"'
docker rm -f searxng-test
- name: Build and push GHCR and Docker Hub
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.GITHUB_LATEST_TAG }}
${{ env.DOCKER_HUB_LATEST_TAG }}