Skip to content

Merge pull request #216 from FoolCode/ci/migrate-to-github-actions #1

Merge pull request #216 from FoolCode/ci/migrate-to-github-actions

Merge pull request #216 from FoolCode/ci/migrate-to-github-actions #1

name: Publish Search Images
on:
workflow_dispatch:
push:
branches:
- master
paths:
- .github/workflows/publish-search-images.yml
- docker/search/**
- tests/sphinx.conf
- tests/manticore.conf
- tests/test_udf.c
- tests/ms_test_udf.c
permissions:
contents: read
packages: write
jobs:
publish:
name: Publish ${{ matrix.target }} image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: sphinx2
version: 2.3.2-beta
dockerfile: docker/search/sphinx2/Dockerfile
- target: sphinx3
version: 3.9.1
dockerfile: docker/search/sphinx3/Dockerfile
- target: manticore
version: 2.6.3
dockerfile: docker/search/manticore/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: |
ghcr.io/foolcode/sphinxql-query-builder-search-${{ matrix.target }}:${{ matrix.target }}-${{ matrix.version }}
ghcr.io/foolcode/sphinxql-query-builder-search-${{ matrix.target }}:${{ matrix.target }}-latest
cache-from: type=gha
cache-to: type=gha,mode=max