From c9262eb204df246fac7d33e1909e250a375652bc Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Fri, 21 Jan 2022 04:35:39 -0800 Subject: [PATCH 1/5] Add build tags and labels (#608) Fixes Docker images always build as 'latest' #607 Signed-off-by: Dan Schaper --- .github/workflows/build-deploy.yml | 40 ++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 2a31c060..e7f368a4 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -3,6 +3,7 @@ name: Maven CI/CD on: push: branches: [master] + tags: [v*] workflow_dispatch: jobs: @@ -33,24 +34,49 @@ jobs: needs: [build_and_publish] steps: - - name: Checkout + - + name: Checkout uses: actions/checkout@v2 - - name: Download war artifact + - + name: Download war artifact uses: actions/download-artifact@v2 with: name: docs-web-ci.war path: docs-web/target - - name: Setup up Docker Buildx + - + name: Setup up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub + - + name: Login to DockerHub + if: github.event_name != "pull_request" uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - + name: Populate Docker metadata + id: metadata + uses: docker/metadata-action@v3 + with: + images: sismics/docs + tags: | + type=ref,event=push + type=ref,event=tag + labels: | + org.opencontainers.image.title = Sismics Teedy + org.opencontainers.image.description = Sismics Teedy is an open source, lightweight document management system for individuals and businesses. + org.opencontainers.image.created = ${{ github.event_created_at }} + org.opencontainers.image.author = Sismics + org.opencontainers.image.url = https://teedy.info/ + org.opencontainers.image.vendor = Sismics + org.opencontainers.image.license = GPL v2 + org.opencontainers.image.version = ${{ github.event_head_commit.id }} + - + name: Build and push id: docker_build uses: docker/build-push-action@v2 with: context: . - push: true - tags: sismics/docs:latest \ No newline at end of file + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file From 58f81ec8514cf5faa694a8a6485b19944b690fb6 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Fri, 21 Jan 2022 13:37:31 +0100 Subject: [PATCH 2/5] fix action --- .github/workflows/build-deploy.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index e7f368a4..1997c168 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -48,7 +48,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - if: github.event_name != "pull_request" + if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -63,13 +63,13 @@ jobs: type=ref,event=push type=ref,event=tag labels: | - org.opencontainers.image.title = Sismics Teedy - org.opencontainers.image.description = Sismics Teedy is an open source, lightweight document management system for individuals and businesses. + org.opencontainers.image.title = Teedy + org.opencontainers.image.description = Teedy is an open source, lightweight document management system for individuals and businesses. org.opencontainers.image.created = ${{ github.event_created_at }} org.opencontainers.image.author = Sismics - org.opencontainers.image.url = https://teedy.info/ + org.opencontainers.image.url = https://teedy.io/ org.opencontainers.image.vendor = Sismics - org.opencontainers.image.license = GPL v2 + org.opencontainers.image.license = GPLv2 org.opencontainers.image.version = ${{ github.event_head_commit.id }} - name: Build and push @@ -79,4 +79,4 @@ jobs: context: . push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file + labels: ${{ steps.metadata.outputs.labels }} From f33650c099ce62a7f30f30c4cfc09c57105a3f41 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Fri, 21 Jan 2022 13:51:16 +0100 Subject: [PATCH 3/5] fix action --- .github/workflows/build-deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 1997c168..ea8d9b92 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -60,7 +60,6 @@ jobs: with: images: sismics/docs tags: | - type=ref,event=push type=ref,event=tag labels: | org.opencontainers.image.title = Teedy From bbe5f199974f4c8d736f2d229cbba25636a04515 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Tue, 25 Jan 2022 01:37:47 -0800 Subject: [PATCH 4/5] Tag latest on master, tag version on github tag. (#612) Signed-off-by: Dan Schaper --- .github/workflows/build-deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index ea8d9b92..2c55d871 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -59,8 +59,11 @@ jobs: uses: docker/metadata-action@v3 with: images: sismics/docs + flavor: | + latest=false tags: | type=ref,event=tag + type=raw,value=latest,enable=${{ github.ref_type != 'tag' }} labels: | org.opencontainers.image.title = Teedy org.opencontainers.image.description = Teedy is an open source, lightweight document management system for individuals and businesses. From af3263d471c34e184f73e53f8593360a63dd2ce9 Mon Sep 17 00:00:00 2001 From: StaryVena Date: Wed, 26 Jan 2022 15:27:14 +0100 Subject: [PATCH 5/5] Add OCR support for Czech language (#613) Co-authored-by: Vaclav Uher --- Dockerfile | 3 ++- .../main/java/com/sismics/docs/core/constant/Constants.java | 2 +- docs-web/src/main/webapp/src/app/docs/app.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48dd8f25..71fbad12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get update && \ mediainfo \ tesseract-ocr \ tesseract-ocr-ara \ + tesseract-ocr-ces \ tesseract-ocr-chi-sim \ tesseract-ocr-chi-tra \ tesseract-ocr-dan \ @@ -39,4 +40,4 @@ RUN rm -f /opt/jetty/lib/mail/javax.mail.glassfish-*.jar ADD docs.xml /opt/jetty/webapps/docs.xml ADD docs-web/target/docs-web-*.war /opt/jetty/webapps/docs.war -ENV JAVA_OPTIONS -Xmx1g \ No newline at end of file +ENV JAVA_OPTIONS -Xmx1g diff --git a/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java b/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java index 52e5faa4..16de2b85 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java +++ b/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java @@ -43,7 +43,7 @@ public class Constants { /** * Supported document languages. */ - public static final List SUPPORTED_LANGUAGES = Lists.newArrayList("eng", "fra", "ita", "deu", "spa", "por", "pol", "rus", "ukr", "ara", "hin", "chi_sim", "chi_tra", "jpn", "tha", "kor", "nld", "tur", "heb", "hun", "fin", "swe", "lav", "dan", "nor", "vie"); + public static final List SUPPORTED_LANGUAGES = Lists.newArrayList("eng", "fra", "ita", "deu", "spa", "por", "pol", "rus", "ukr", "ara", "hin", "chi_sim", "chi_tra", "jpn", "tha", "kor", "nld", "tur", "heb", "hun", "fin", "swe", "lav", "dan", "nor", "vie", "ces"); /** * Base URL environment variable. diff --git a/docs-web/src/main/webapp/src/app/docs/app.js b/docs-web/src/main/webapp/src/app/docs/app.js index db15cc37..c4de5660 100644 --- a/docs-web/src/main/webapp/src/app/docs/app.js +++ b/docs-web/src/main/webapp/src/app/docs/app.js @@ -545,7 +545,8 @@ angular.module('docs', { key: 'lav', label: 'Latviešu' }, { key: 'dan', label: 'Dansk' }, { key: 'nor', label: 'Norsk' }, - { key: 'vie', label: 'Tiếng Việt' } + { key: 'vie', label: 'Tiếng Việt' }, + { key: 'ces', label: 'Czech' } ]; }) /**