Skip to content

Make CI testing compatible with large image and girder 5 #2553

Make CI testing compatible with large image and girder 5

Make CI testing compatible with large image and girder 5 #2553

Workflow file for this run

---
name: Docker Package
on:
push:
tags: "*"
branches:
- master
pull_request:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-publish-base:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository )
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: token
password: ${{ secrets.GITHUB_TOKEN }}
# Build and publish image with all sources
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
context: .
file: slim.Dockerfile
target: all
push: ${{ github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-publish-targets:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository )
strategy:
fail-fast: false
matrix:
target:
- "geo"
- "jupyter"
- "jupyter-geo"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: token
password: ${{ secrets.GITHUB_TOKEN }}
# Build and publish image with only geospatial sources
- name: Extract metadata for the geospatial Docker image
id: meta_target
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
suffix=-${{ matrix.target }},onlatest=true
- name: Build and push the geosptial Docker image
uses: docker/build-push-action@v6
with:
context: .
file: slim.Dockerfile
target: ${{ matrix.target }}
push: ${{ github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta_target.outputs.tags }}
labels: ${{ steps.meta_target.outputs.labels }}