Skip to content

Commit

Permalink
Merge pull request #18 from vrenaville/doreun
Browse files Browse the repository at this point in the history
feat: swithc to odoo for for wkhtmltopdf
  • Loading branch information
vrenaville authored Nov 16, 2023
2 parents 78381e7 + 752bf26 commit f51d01e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 52 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test, build and push to github packages
on:
pull_request:
branches:
- 'master'
- 'devel'
push:
branches:
- '*'
tags:
- '*.*.*'

jobs:
build-images:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set ENV for branch master/main
if: ${{ github.ref == 'refs/heads/master' }}
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV
- name: Set ENV for tags
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set ENV for specific branch
if: ${{ startsWith(github.ref, 'refs/heads/') && !endsWith(github.ref, '/master') }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}-${GITHUB_SHA}" >> $GITHUB_ENV
- name: Login to ghio
uses: docker/login-action@v1
with:
registry: camptocampdev.azurecr.io
username: ${{ secrets.GH_USER }}
password: ${{ secrets.GH_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta-kwkhtmltopdf
uses: docker/metadata-action@v5.0.0
with:
images: |
ghcr.io/camptocamp/kwkhtmltopdf
- name: Build + Push kwkhtmltopdf
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta-kwkhtmltopdf.tags }}
labels: ${{ steps.meta-kwkhtmltopdf.labels }}

47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

9 changes: 4 additions & 5 deletions Dockerfile-0.12.5 → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ RUN go build kwkhtmltopdf_server.go

# second stage: server with wkhtmltopdf

FROM debian:bullseye-slim
FROM debian:bookworm-slim

RUN set -x \
&& apt update \
&& apt -y install --no-install-recommends wget ca-certificates fonts-liberation2 fonts-nanum-coding fonts-horai-umefont fonts-wqy-microhei curl nano vim \
&& wget -q -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \
&& echo "ea8277df4297afc507c61122f3c349af142f31e5 /tmp/wkhtmltox.deb" | sha1sum -c - \
&& apt -y install --no-install-recommends wget ca-certificates fonts-liberation2 fonts-nanum-coding fonts-horai-umefont fonts-wqy-microhei \
&& wget -q -O /tmp/wkhtmltox.deb https://github.com/odoo/wkhtmltopdf/releases/download/nightly/wkhtmltox_0.13.0-1.nightly.bookworm_amd64.deb \
&& echo "a8f28ec5a71d18a4791e48ece56ad7395fd0f935 /tmp/wkhtmltox.deb" | sha1sum -c - \
&& apt -y install /tmp/wkhtmltox.deb \
&& apt -y purge wget --autoremove \
&& apt -y clean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=0 /tmp/kwkhtml/kwkhtmltopdf_server /usr/local/bin/

RUN adduser --disabled-password --gecos '' kwkhtmltopdf
Expand Down

0 comments on commit f51d01e

Please sign in to comment.