Add libudunits2 for sf #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration and Delivery | |
| on: | |
| schedule: | |
| - cron: '0 0 1 * *' # Runs at 00:00 on the 1st day of every month | |
| push: | |
| branches: | |
| - 'master' | |
| - 'main' | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| build-and-push-images: | |
| permissions: | |
| contents: read | |
| packages: write | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image: minimal | |
| dockerfile: minimal/Dockerfile | |
| - image: suggests | |
| dockerfile: suggests/Dockerfile | |
| - image: binder | |
| dockerfile: binder/Dockerfile | |
| - image: osgeo | |
| dockerfile: osgeo/Dockerfile | |
| - image: qgis | |
| dockerfile: qgis/Dockerfile | |
| - image: rocker-rpy | |
| dockerfile: rocker-rpy/Dockerfile | |
| - image: rocker-rpyjl | |
| dockerfile: rocker-rpyjl/Dockerfile | |
| - image: rust | |
| dockerfile: rust/Dockerfile | |
| - image: buildbook | |
| dockerfile: buildbook/Dockerfile | |
| - image: mamba-py | |
| dockerfile: mamba-py/Dockerfile | |
| - image: mamba-pyr | |
| dockerfile: mamba-pyr/Dockerfile | |
| - image: pythonr | |
| dockerfile: pythonr/Dockerfile | |
| - image: latest # This is the root Dockerfile | |
| dockerfile: Dockerfile | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/geocompx/${{ matrix.image }} | |
| tags: | | |
| type=sha,enable=${{ github.event_name == 'push' }} | |
| type=raw,value=latest,enable=${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
| type=raw,value={{date 'YYYY-MM-DD'}},enable=${{ github.event_name == 'schedule' }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # ... no Prepare tags step; metadata-action will emit latest when appropriate | |
| - name: Login to GitHub Container Registry | |
| if: github.event_name == 'schedule' || github.event_name == 'push' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| if: github.event_name == 'schedule' || github.event_name == 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| secrets: | | |
| "GITHUB_PAT=${{ secrets.GITHUB_TOKEN }}" | |
| update-readme: | |
| needs: build-and-push-images | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' # Only run this on the scheduled run | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PAT_FOR_PUSH }} # A PAT with repo scope is needed | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| - name: Install R dependencies | |
| run: R -e "install.packages(c('rmarkdown', 'gert'))" | |
| - name: Run cron script to update README.Rmd | |
| run: Rscript -e "rmarkdown::render('README.Rmd')" | |
| env: | |
| GITHUB_PAT: ${{ secrets.PAT_FOR_PUSH }} | |
| - name: Commit and push README.md | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add README.md | |
| git commit -m "docs: render README.md from Rmd [skip ci]" || echo "No changes to commit" | |
| git push || echo "No changes to push" |