Skip to content

Commit

Permalink
Merge pull request #2 from opengisch/m-kuhn-patch-1
Browse files Browse the repository at this point in the history
Set qpa and pythonpath
  • Loading branch information
m-kuhn authored Aug 27, 2024
2 parents 788ed06 + 5cd1494 commit b154242
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

pull_request:
branches:
- main

schedule:
- cron: '30 5 * * *'

Expand Down Expand Up @@ -55,9 +59,30 @@ jobs:
QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
cache-to: type=local,dest=cache

- name: Build and push release
uses: docker/build-push-action@v3
- name: Build release
uses: docker/build-push-action@v6
if: env.DO_BUILD == 'true'
with:
context: .
push: false
load: true
build-args: |
QGIS_VERSION=${{ env.QGIS_VERSION_TAG }}
QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
cache-from: type=local,src=cache
tags: |
ghcr.io/opengisch/qgis-slim:latest
ghcr.io/opengisch/qgis-slim:${{ matrix.release_line }}
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_SHORT }}
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_PATCH }}
- name: Test
run: |
docker run --rm ghcr.io/opengisch/qgis-slim:latest python3 -c 'from qgis.core import QgsApplication; QgsApplication([], False)'
- name: Push release
uses: docker/build-push-action@v6
if: env.DO_BUILD == 'true' && github.event_name != 'pull_request'
with:
context: .
push: true
Expand All @@ -71,6 +96,7 @@ jobs:
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_SHORT }}
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_PATCH }}
# - name: Build and push debug
# uses: docker/build-push-action@v3
# if: env.DO_BUILD == 'true'
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ WORKDIR /data

ENTRYPOINT [ "/tini", "--", "/usr/local/bin/uid_entrypoint.sh" ]

ENV PYTHONPATH="/usr/share/qgis/python/"
ENV QT_QPA_PLATFORM=offscreen

EXPOSE 5000

CMD [ "/usr/local/bin/run.sh" ]
Expand Down

0 comments on commit b154242

Please sign in to comment.