Skip to content

Update build workflows to use image caching, multi-arch, auto-tag #47

Update build workflows to use image caching, multi-arch, auto-tag

Update build workflows to use image caching, multi-arch, auto-tag #47

Workflow file for this run

name: PR Test Backend
on:
pull_request:
branches:
- main
- staging
- development
# Workflow is triggered only if src/backend changes
paths:
- src/backend/**
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:
jobs:
pytest:
uses: hotosm/gh-workflows/.github/workflows/test_pytest_compose.yml@main
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_context: src/backend
build_args: |
APP_VERSION=${{ github.ref_name }}
COMMIT_REF=${{ github.sha }}
docker_compose_service: api
cache_extra_imgs: |
"docker.io/postgis/postgis:${{ vars.POSTGIS_TAG }}"
"docker.io/minio/minio:${{ vars.MINIO_TAG }}"
# For caching odk central images, add:
# "ghcr.io/${{ github.repository }}/odkcentral:${{ vars.ODK_CENTRAL_TAG }}"
# "ghcr.io/${{ github.repository }}/odkcentral-proxy:${{ vars.ODK_CENTRAL_TAG }}"
secrets: inherit