Skip to content

Merge pull request #189 from SAY-5/fix/pdfparser-file-handle-leak #217

Merge pull request #189 from SAY-5/fix/pdfparser-file-handle-leak

Merge pull request #189 from SAY-5/fix/pdfparser-file-handle-leak #217

Workflow file for this run

# SPDX-FileCopyrightText: 2025 PeARS Project, <community@pearsproject.org>
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Docker Image CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
if: github.event_name != 'pull_request'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Determine Docker tags
id: meta
run: |
TAGS="pearsproject/pears-federated:latest"
TAGS="$TAGS,pearsproject/pears-federated:sha-${GITHUB_SHA::7}"
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF#refs/tags/v}"
TAGS="$TAGS,pearsproject/pears-federated:$VERSION"
fi
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Build and push (main / tag)
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: deployment/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build only (PR)
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: deployment/Dockerfile
push: false
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max