From f5a67531cc46bdb71fccfa422db93107bda973e7 Mon Sep 17 00:00:00 2001 From: LePetitTim Date: Wed, 1 Mar 2023 12:50:21 +0100 Subject: [PATCH 01/28] =?UTF-8?q?=F0=9F=91=B7=20Add=20publication=20regist?= =?UTF-8?q?ry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2daafa06e2..af7cf679a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -399,17 +399,27 @@ jobs: with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Publish Docker image (v2 and latest) run: | if [[ "${{ github.ref }}" == *"dev"* ]]; then export DOCKER_TAG=dev else + docker tag geotrek:latest ghcr.io/geotrek-admin:$DOCKER_TAG docker tag geotrek:latest geotrekce/admin:$(cat VERSION) docker push geotrekce/admin:$(cat VERSION) + docker push ghcr.io/geotrek-admin:$(cat VERSION) export DOCKER_TAG=latest fi docker tag geotrek:latest geotrekce/admin:$DOCKER_TAG + docker tag geotrek:latest ghcr.io/geotrek-admin:$DOCKER_TAG docker push geotrekce/admin:$DOCKER_TAG + docker push ghcr.io/geotrek-admin:$DOCKER_TAG - name: Install SSH key uses: shimataro/ssh-key-action@v2 with: From ea1409580977772253be16545f4bc5b6356c0d2f Mon Sep 17 00:00:00 2001 From: Jean-Etienne Castagnede Date: Wed, 6 Sep 2023 10:08:43 +0200 Subject: [PATCH 02/28] set permission to publish docker image to github --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af7cf679a9..40e52f4a3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,9 @@ jobs: name: Python Unittests runs-on: ubuntu-latest container: makinacorpus/geodjango:${{ matrix.os }} + + permissions: + packages: write # required to publish docker image strategy: matrix: From b856abe7b8f96e47069d17b483de45a493252d81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:28:18 +0000 Subject: [PATCH 03/28] Bump tornado from 6.4.1 to 6.4.2 in /docs Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.1 to 6.4.2. - [Changelog](https://github.com/tornadoweb/tornado/blob/v6.4.2/docs/releases.rst) - [Commits](https://github.com/tornadoweb/tornado/compare/v6.4.1...v6.4.2) --- updated-dependencies: - dependency-name: tornado dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 2630f0cf0c..eaf58453ff 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -60,16 +60,16 @@ snowballstemmer==2.2.0 # via sphinx sphinx==7.1.2 # via - # -r docs/requirements.in + # -r requirements.in # sphinx-autobuild # sphinx-immaterial # sphinx-intl sphinx-autobuild==2021.3.14 - # via -r docs/requirements.in + # via -r requirements.in sphinx-immaterial==0.11.14 - # via -r docs/requirements.in + # via -r requirements.in sphinx-intl==2.2.0 - # via -r docs/requirements.in + # via -r requirements.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -82,7 +82,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -tornado==6.4.1 +tornado==6.4.2 # via livereload typing-extensions==4.12.2 # via From 7128758c97a3a23a9db412dbe31a1d15cdd68149 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 10:53:03 +0100 Subject: [PATCH 04/28] fix docs --- docs/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index eaf58453ff..655fc0513b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -60,16 +60,16 @@ snowballstemmer==2.2.0 # via sphinx sphinx==7.1.2 # via - # -r requirements.in + # -r docs/requirements.in # sphinx-autobuild # sphinx-immaterial # sphinx-intl sphinx-autobuild==2021.3.14 - # via -r requirements.in + # via -r docs/requirements.in sphinx-immaterial==0.11.14 - # via -r requirements.in + # via -r docs/requirements.in sphinx-intl==2.2.0 - # via -r requirements.in + # via -r docs/requirements.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 From da30c8cb66e6ca10c458cb6ef3ceaaa5d281cee5 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 11:24:05 +0100 Subject: [PATCH 05/28] disable bionic tests --- .github/workflows/test.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 462145d8eb..19b3f61cb9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: strategy: matrix: - os: ['bionic-3.8', 'focal-3.8', 'jammy-3.10'] + os: ['focal-3.8', 'jammy-3.10'] tests-env: ['tests', 'tests_nds'] env: @@ -72,7 +72,7 @@ jobs: - 6379:6379 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/cache@v3 with: path: | @@ -114,13 +114,7 @@ jobs: libvips apt-get install -y --no-install-recommends postgis - - name: Install python venv for bionic - if: ${{ matrix.os == 'bionic-3.8'}} - run: | - python3.8 -m venv ./venv - - name: Install python venv - if: ${{ matrix.os != 'bionic-3.8'}} run: | python3 -m venv ./venv @@ -158,7 +152,6 @@ jobs: ./venv/bin/coverage xml -o coverage.xml - name: Save coverage - if: ${{ matrix.os != 'bionic-3.8'}} uses: actions/upload-artifact@v4 with: name: coverage_${{ matrix.os }}_${{ matrix.tests-env }} From 67daf36148e71a282ce9024623aff50dd4f69908 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:40:19 +0000 Subject: [PATCH 06/28] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependencies.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/lint.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 3fbe11e265..f7dfe99190 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -22,7 +22,7 @@ jobs: python-version: ['3.8'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: ./.github/actions/python-cache-requirements diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 72ec66ce47..fd520b4ad0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -21,7 +21,7 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/python-cache-requirements with: requirements: docs/requirements.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 758254c7f1..327c4f9311 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: name: Checking SRID in migrations files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | test $(ls geotrek/*/migrations/*.py | xargs grep -l srid | xargs grep -L SRID | wc -l) -eq 0 @@ -24,7 +24,7 @@ jobs: name: Checking Flake8 rules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/python-cache-requirements with: requirements: dev-requirements.txt From a6db591fe62047f79da8f68feb79b8bb1aa75644 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 11:16:18 +0100 Subject: [PATCH 07/28] improve docker image definition and building --- .github/workflows/test.yml | 34 ++++++++++++++++++++++------------ docker/Dockerfile | 11 +++++++++++ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19b3f61cb9..149f94d93f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: push: branches: - master + - improve_docker_image paths-ignore: - 'docs/**' release: @@ -419,7 +420,7 @@ jobs: name: Publish (on release only) runs-on: ubuntu-latest needs: [ test, e2e_docker_image, build_deb, e2e_deb_20_04 ] - if: ${{ github.event_name == 'release' && github.event.action == 'created' }} + if: ${{ github.event_name != 'pull_request' }} steps: - uses: actions/checkout@v4 - name: Download 18.04 debian artifact @@ -443,17 +444,24 @@ jobs: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Publish Docker image (v2 and latest) - run: | - if [[ "${{ github.ref }}" == *"dev"* ]]; then - export DOCKER_TAG=dev - else - docker tag geotrek:latest geotrekce/admin:$(cat VERSION) - docker push geotrekce/admin:$(cat VERSION) - export DOCKER_TAG=latest - fi - docker tag geotrek:latest geotrekce/admin:$DOCKER_TAG - docker push geotrekce/admin:$DOCKER_TAG + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: geotrekce/admin + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + push: true + provenance: mode=max + sbom: true + builder: ${{ steps.buildx.outputs.name }} + tags: ${{ steps.meta.outputs.tags }} - name: Install SSH key uses: shimataro/ssh-key-action@v2 @@ -462,6 +470,7 @@ jobs: known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} - name: Publish debian packages + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} run: | if [[ "${{ github.ref }}" == *"dev"* ]]; then export DEB_COMPONENT=dev @@ -484,6 +493,7 @@ jobs: name: jammy - name: Attach debian packages as release binaries + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} uses: skx/github-action-publish-binaries@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 8620518639..a54e197eed 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,17 @@ ARG BASE_IMAGE=jammy FROM ubuntu:${BASE_IMAGE} AS base +# add labels +LABEL org.opencontainers.image.authors="Makina Corpus" +LABEL org.opencontainers.image.source="https://github.com/GeotrekCE/Geotrek-admin/" +LABEL org.opencontainers.image.documentation="https://geotrek.readthedocs.io/" +LABEL org.opencontainers.image.vendor="Makina Corpus" +LABEL org.opencontainers.image.licenses="BSD-2-Clause" +LABEL org.opencontainers.image.url="https://geotrek.fr" +LABEL org.opencontainers.image.title="Geotrek-admin" +LABEL org.opencontainers.image.description="Manage and promote your trails and tourist content and activities." + + ENV PYTHONBUFFERED=1 ENV DEBIAN_FRONTEND=noninteractive ENV ENV=prod From f5028c3db81b4fec10f0d797928a541fb462b11f Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 11:17:16 +0100 Subject: [PATCH 08/28] improve docker image definition and building --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 149f94d93f..8751415b4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: push: branches: - master - - improve_docker_image + - improve_docker_image_2 paths-ignore: - 'docs/**' release: From d345d806138296450389df13282d0dfe99db675e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:54:40 +0000 Subject: [PATCH 09/28] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19b3f61cb9..8daed5de4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,7 +73,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ./venv From 7235e2556faaa41586b8c5c3210f448430b020f0 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 11:58:04 +0100 Subject: [PATCH 10/28] fix docker build --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8751415b4a..5a5a7b1cc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -425,11 +425,13 @@ jobs: - uses: actions/checkout@v4 - name: Download 18.04 debian artifact uses: actions/download-artifact@v4 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: name: bionic - name: Download 20.04 debian artifact uses: actions/download-artifact@v4 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: name: focal @@ -462,9 +464,12 @@ jobs: sbom: true builder: ${{ steps.buildx.outputs.name }} tags: ${{ steps.meta.outputs.tags }} + load: true + file: ./docker/Dockerfile - name: Install SSH key uses: shimataro/ssh-key-action@v2 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: key: ${{ secrets.SSH_PRIVATE_KEY }} known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} @@ -488,6 +493,7 @@ jobs: fi - name: Download 22.04 debian artifact + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} uses: actions/download-artifact@v4 with: name: jammy From 9d1531602bbdf4c675b3b4e0afb3ba3c75615089 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 12:13:49 +0100 Subject: [PATCH 11/28] fix docker build --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a5a7b1cc6..8c6e8d49fa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -446,10 +446,6 @@ jobs: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Extract metadata id: meta uses: docker/metadata-action@v5 @@ -462,9 +458,7 @@ jobs: push: true provenance: mode=max sbom: true - builder: ${{ steps.buildx.outputs.name }} tags: ${{ steps.meta.outputs.tags }} - load: true file: ./docker/Dockerfile - name: Install SSH key From ea5ed43cfadecb40021cc0112ba5be55b1845423 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:20:34 +0000 Subject: [PATCH 12/28] Bump django-appconf from 1.0.5 to 1.0.6 Bumps [django-appconf](https://github.com/django-compressor/django-appconf) from 1.0.5 to 1.0.6. - [Release notes](https://github.com/django-compressor/django-appconf/releases) - [Changelog](https://github.com/django-compressor/django-appconf/blob/develop/docs/changelog.rst) - [Commits](https://github.com/django-compressor/django-appconf/compare/v1.0.5...v1.0.6) --- updated-dependencies: - dependency-name: django-appconf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cfda301c3f..d39f2700b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -122,7 +122,7 @@ django==4.2.16 # geotrek (setup.py) # mapentity # paperclip -django-appconf==1.0.5 +django-appconf==1.0.6 # via django-compressor django-appypod==2.0.7 # via mapentity From 95fcea5da3f5b93f74627e8b526b1a3c023d2b3d Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 12:39:00 +0100 Subject: [PATCH 13/28] fix docker build --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c6e8d49fa..cb5390b38b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -446,6 +446,10 @@ jobs: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Extract metadata id: meta uses: docker/metadata-action@v5 @@ -458,6 +462,7 @@ jobs: push: true provenance: mode=max sbom: true + builder: ${{ steps.buildx.outputs.name }} tags: ${{ steps.meta.outputs.tags }} file: ./docker/Dockerfile From 4174921302ad94ec100c8d9d94b39e7d80980e43 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 13:13:59 +0100 Subject: [PATCH 14/28] fix docker build --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb5390b38b..4345ba7759 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,6 @@ on: push: branches: - master - - improve_docker_image_2 paths-ignore: - 'docs/**' release: From fc01191fec15c94dd63276c9b76b8e0e73c2eff0 Mon Sep 17 00:00:00 2001 From: Jean-Etienne Castagnede Date: Tue, 26 Nov 2024 14:00:26 +0100 Subject: [PATCH 15/28] Apply suggestions from code review fix image list --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de4bc1ad4e..ea956433ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -456,9 +456,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: - - geotrekce/admin - - ghcr.io/geotrek-admin + images: | + geotrekce/admin + ghcr.io/geotrek-admin - name: Build and push image uses: docker/build-push-action@v6 From 3b8e4302996256bb37b7cdf2c650f056c306f6ed Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 14:15:29 +0100 Subject: [PATCH 16/28] add docker tag --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea956433ee..a0505e84aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: push: branches: - master + - ci_add_registry_publish paths-ignore: - 'docs/**' release: From 03be1bb13d812313584ba5b6e522d01215e1eb6d Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 14:45:32 +0100 Subject: [PATCH 17/28] add docker tag --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0505e84aa..7b09eccc4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -449,6 +449,13 @@ jobs: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 From f5ad25592783904219a7db96a0b6ce73791b0344 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 15:06:40 +0100 Subject: [PATCH 18/28] add docker tag --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b09eccc4a..8f7db7b13a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -466,7 +466,7 @@ jobs: with: images: | geotrekce/admin - ghcr.io/geotrek-admin + ghcr.io/geotrekce/geotrek-admin - name: Build and push image uses: docker/build-push-action@v6 From fe02ae768a38da400333942602ae2268cba46251 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 15:25:48 +0100 Subject: [PATCH 19/28] add docker tag --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f7db7b13a..507089e266 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: push: branches: - master - - ci_add_registry_publish + paths-ignore: - 'docs/**' release: From 2cb41ea5682abfd7123d699924a2fb4e3705a750 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 26 Nov 2024 15:27:45 +0100 Subject: [PATCH 20/28] add entry log --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 35f3e095f4..c85cf11d15 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,6 +8,7 @@ CHANGELOG **Improvements** - Remove overriding of SchemaRandonneeParser's filetype_name attribute (#4022) +- Docker image is now mirrored on github registry **Bug fixes** From 8d3a31e612c510df48b8fa9497d888b1c69d1445 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 12 Jul 2022 14:46:57 +0200 Subject: [PATCH 21/28] improve sync_rando view --- geotrek/common/templates/common/sync_rando.html | 0 geotrek/common/urls.py | 4 +++- geotrek/common/views.py | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 geotrek/common/templates/common/sync_rando.html diff --git a/geotrek/common/templates/common/sync_rando.html b/geotrek/common/templates/common/sync_rando.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/geotrek/common/urls.py b/geotrek/common/urls.py index 172ad6fb7f..ebdbfcae74 100644 --- a/geotrek/common/urls.py +++ b/geotrek/common/urls.py @@ -7,7 +7,6 @@ from .models import HDViewPoint from . import views - class LangConverter(converters.StringConverter): regex = "[a-z]{2}(-[a-z]{2,4})?" # noqa @@ -63,6 +62,9 @@ class LangConverter(converters.StringConverter): class PublishableEntityOptions(MapEntityOptions): + document_public_view = views.DocumentPublic + document_public_booklet_view = views.DocumentBookletPublic + markup_public_view =views.MarkupPublic document_public_view = views.DocumentPublic document_public_booklet_view = views.DocumentBookletPublic markup_public_view = views.MarkupPublic diff --git a/geotrek/common/views.py b/geotrek/common/views.py index f6b4852bce..e9cd7b71fa 100644 --- a/geotrek/common/views.py +++ b/geotrek/common/views.py @@ -31,6 +31,10 @@ from django.views.defaults import page_not_found from django.views.decorators.http import require_http_methods, require_POST from django.views.generic import TemplateView, UpdateView, View +from django.views.generic import RedirectView, TemplateView, UpdateView, View +from django.views.decorators.http import require_POST, require_http_methods +from django.views.generic import RedirectView, View, FormView +from django.views.generic import TemplateView from django_celery_results.models import TaskResult from django_large_image.rest import LargeImageFileDetailMixin from geotrek.common.filters import HDViewPointFilterSet From d229609f6876e80d542d1efd2196bdeec67e8306 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Fri, 30 Sep 2022 11:23:44 +0200 Subject: [PATCH 22/28] pep8 --- geotrek/common/urls.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/geotrek/common/urls.py b/geotrek/common/urls.py index ebdbfcae74..172ad6fb7f 100644 --- a/geotrek/common/urls.py +++ b/geotrek/common/urls.py @@ -7,6 +7,7 @@ from .models import HDViewPoint from . import views + class LangConverter(converters.StringConverter): regex = "[a-z]{2}(-[a-z]{2,4})?" # noqa @@ -62,9 +63,6 @@ class LangConverter(converters.StringConverter): class PublishableEntityOptions(MapEntityOptions): - document_public_view = views.DocumentPublic - document_public_booklet_view = views.DocumentBookletPublic - markup_public_view =views.MarkupPublic document_public_view = views.DocumentPublic document_public_booklet_view = views.DocumentBookletPublic markup_public_view = views.MarkupPublic From d4166ca84fa6a93256f9216d085a28ea7097bc38 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Thu, 6 Oct 2022 10:41:23 +0200 Subject: [PATCH 23/28] import sync and import views --- docs/changelog.rst | 3 +- geotrek/api/templates/mobile/sync_mobile.html | 72 ++++++++------- .../static/common/css/sync.css} | 0 .../templates/common/import_dataset.html | 90 +++++++++---------- 4 files changed, 88 insertions(+), 77 deletions(-) rename geotrek/{trekking/static/trekking/css/sync_trek.css => common/static/common/css/sync.css} (100%) diff --git a/docs/changelog.rst b/docs/changelog.rst index c85cf11d15..3b2062ea24 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -936,6 +936,7 @@ In preparation for HD Views developments (PR #3298) - Show direction on lines with setting ``DIRECTION_ON_LINES_ENABLED`` in signage detail - Add mobile nginx configuration directly on Geotrek-admin +- Improve sync rando, sync mobile and import views. **Bug fixes** @@ -951,7 +952,7 @@ In preparation for HD Views developments (PR #3298) !!!! Clear cache after update. You can do this by going to admin panel, "clearcache" section, then delete default / fat and api_v2 !!!! -**Improvements** +**Improvments** - Cache API v2 Detail endpoints and themes list endpoint - Sensitive areas are now computed with buffered geometries with settings SENSITIVE_AREA_INTERSECTION_MARGIN. Use ST_INTERSECTS on it is faster. diff --git a/geotrek/api/templates/mobile/sync_mobile.html b/geotrek/api/templates/mobile/sync_mobile.html index f689781660..c0f6cefb9b 100644 --- a/geotrek/api/templates/mobile/sync_mobile.html +++ b/geotrek/api/templates/mobile/sync_mobile.html @@ -32,29 +32,29 @@ has_progress = true; disable_sync_button(false); - $('#progress-value').show(); - $("#progress-value").removeClass('bar-danger'); - $("#progress-value").parent().addClass("active"); + $("#progress-bar").removeClass('bg-danger'); + $("#progress-bar").parent().addClass("active"); if (this.result.current) { - $("#progress-value").css("width", this.result.current+'%'); + $("#progress-bar").css("width", this.result.current + '%'); - if (this.result.current == 100){ - $("#progress-value").parent().removeClass("active"); - $("#progress-value").addClass('bar-success'); - } + if (this.result.current == 100) { + $("#progress-bar").parent().removeClass("active"); + $("#progress-bar").addClass('bg-success'); + } } if (this.result.infos) { - $("#progress-text").text(this.result.infos); - } + $("#progress-bar").text(this.result.infos); + } } else { if (this.status == 'FAILURE'){ // case of exception in task - $("#progress-text").text("{% trans 'An error occured' %}"); - $('#exception-message').text(this.result.exc_type + ' : ' + this.result.exc_message) - $("#progress-value").addClass('bar-danger'); - $("#progress-value").parent().removeClass("active"); + $("#progress-bar").text("{% trans 'An error occured' %}"); + $('#exception-message').text(this.result.exc_type + ' : ' + this.result.exc_message) + $('#exception-message').show(); + $("#progress-bar").addClass('bg-danger'); + $("#progress-value").parent().removeClass("active"); } } }); @@ -70,11 +70,12 @@ get_sync_infos(); $('#btn-confirm')[0].addEventListener('click', function(evt) { - $("#progress-value").css("width", '0%'); - $("#progress-text").text(''); - $("#progress-value").parent().addClass("active"); - $("#progress-value").removeClass('bar-success'); - $("#progress-value").removeClass('bar-danger'); + $('#exception-message').hide(); + $("#progress-bar").css("width", '0%'); + $("#progress-bar").text(''); + $("#progress-bar").parent().addClass("active"); + $("#progress-bar").removeClass('bg-success'); + $("#progress-bar").removeClass('bg-danger'); $.post( $('#form-sync').attr('action'), @@ -87,10 +88,10 @@ window.setInterval(function(){ get_sync_infos(); - }, 500); + }, 1000); }); - + {% endblock extrahead %} {% block toolbar %} @@ -98,22 +99,31 @@ {% block mainpanel %} -
-

{% trans "Mobile sync" %}

-
-
- -
- {% block mainform %} - {% crispy form form.helper %} - {% endblock mainform %} +
+
+
+

{% trans "Mobile sync" %}

+
+ +
+
+
+
+ +
+ +