Skip to content

feat: make photo title searchable (any_text + title: prefix) #1881

feat: make photo title searchable (any_text + title: prefix)

feat: make photo title searchable (any_text + title: prefix) #1881

Workflow file for this run

name: docker-buildx
on:
pull_request:
branches:
- master
- experimental
push:
branches:
- '**'
tags:
- '*.*'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: getong/mariadb-action@v1.11
with:
mysql database: 'pigallery_test'
mysql root password: 'password'
mysql user: 'user'
mysql password: 'password'
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Verify MariaDB connection
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
sleep 1
done
- name: npm install and build
run: |
npm ci
npm run build
- name: lint
run: |
npm run lint
- name: test
run: |
npm test
npm run coverage
env:
MYSQL_HOST: localhost
MYSQL_USERNAME: root
MYSQL_PASSWORD: password
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
PORT: 35000
CI: true
- name: Coveralls
uses: coverallsapp/github-action@v2
- name: E2E test - Cypress run
uses: cypress-io/github-action@v7
env:
DEBUG: '@cypress/github-action'
with:
start: npm run start-e2e-server
# after the test run completes store screenshots
- uses: actions/upload-artifact@v7
if: failure() # Store screenshots only on failures
with:
name: cypress-screenshots
path: test/cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
create-release:
runs-on: [ubuntu-latest]
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Setup Node.js for use with actions
uses: actions/setup-node@v6
with:
node-version: 22
-
name: Install Deps
run: npm install --unsafe-perm
-
name: Create Release
run: npm run create-release -- --skip-opt-packages=ffmpeg-static,ffprobe-static --force-opt-packages
- uses: actions/upload-artifact@v7
with:
name: pigallery2-release
path: release
# --- MULTI-PLATFORM DOCKER VERIFICATION ---
build-verify-docker:
runs-on: ubuntu-latest
needs: [test, create-release]
strategy:
fail-fast: false # Ensures one platform failure doesn't stop others from testing
matrix:
container: [alpine, debian-trixie]
include:
- container: alpine
platforms: linux/amd64,linux/arm64,linux/arm/v7
- container: debian-trixie
platforms: linux/amd64,linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download Release Artifact
uses: actions/download-artifact@v8
with:
name: pigallery2-release
path: pigallery2-release
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Verify Platforms
uses: docker/build-push-action@v7
with:
context: .
file: docker/${{ matrix.container }}/Dockerfile.build
platforms: ${{ matrix.platforms }}
push: false # Do not push yet
cache-from: type=gha
cache-to: type=gha,mode=max
# --- DOCKER LOGIN AND PUSH ---
push-docker:
runs-on: ubuntu-latest
needs: [build-verify-docker]
# Only push on branch merges or tags, never on plain PRs
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/experimental'
strategy:
matrix:
container: [alpine, debian-trixie]
include:
- container: alpine
platforms: linux/amd64,linux/arm64,linux/arm/v7
- container: debian-trixie
platforms: linux/amd64,linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download Release Artifact
uses: actions/download-artifact@v8
with:
name: pigallery2-release
path: pigallery2-release
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push Verified Images
uses: docker/build-push-action@v7
with:
context: .
file: docker/${{ matrix.container }}/Dockerfile.build
platforms: ${{ matrix.platforms }}
push: true
cache-from: type=gha # Pulls from the cache created in Job 1
tags: |
${{ (github.ref == 'refs/heads/master' && matrix.container == 'debian-trixie') && format('{0}/pigallery2:edge,{0}/pigallery2:edge-{1}', secrets.REGISTRY_NAMESPACE, matrix.container) || '' }}
${{ (github.ref == 'refs/heads/master' && matrix.container != 'debian-trixie') && format('{0}/pigallery2:edge-{1}', secrets.REGISTRY_NAMESPACE, matrix.container) || '' }}
${{ (github.ref == 'refs/heads/experimental') && format('{0}/pigallery2:experimental-{1}', secrets.REGISTRY_NAMESPACE, matrix.container) || '' }}
${{ (startsWith(github.ref, 'refs/tags/') && matrix.container == 'debian-trixie') && format('{0}/pigallery2:{1},{0}/pigallery2:latest,{0}/pigallery2:edge-{2}', secrets.REGISTRY_NAMESPACE, github.ref_name, matrix.container) || '' }}
${{ (startsWith(github.ref, 'refs/tags/') && matrix.container != 'debian-trixie') && format('{0}/pigallery2:{1}-{2},{0}/pigallery2:latest-{2},{0}/pigallery2:edge-{2}', secrets.REGISTRY_NAMESPACE, github.ref_name, matrix.container) || '' }}