Skip to content

Commit

Permalink
Merge pull request #64 from PeARSearch/add-poppler-utils
Browse files Browse the repository at this point in the history
Fixing the dockerfile again
  • Loading branch information
minimalparts authored Jul 15, 2024
2 parents 243f88e + de7c12c commit 74c9f9b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
build:
Expand All @@ -22,13 +26,25 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Determine Docker tag
id: docker-tag
run: |
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref }}" == "refs/heads/main" ]; then
echo "::set-output name=tag::latest"
elif [ "${{ github.event_name }}" == "pull_request" ]; then
echo "::set-output name=tag::pr-${{ github.event.number }}"
else
BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's/refs\/heads\///')
echo "::set-output name=tag::${BRANCH_NAME}"
fi
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: deployment/Dockerfile
push: true
tags: pearsproject/pears-federated:latest
tags: pearsproject/pears-federated:${{ steps.docker-tag.outputs.tag }}

- name: Image digest
run: echo ${{ steps.build.outputs.digest }}
run: echo ${{ steps.build.outputs.digest }}
2 changes: 1 addition & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /app
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt

RUN apt-get install -y poppler-utils
RUN apt update && apt install -y poppler-utils

# Additionally, install Gunicorn
RUN pip install gunicorn
Expand Down

0 comments on commit 74c9f9b

Please sign in to comment.