Skip to content

Merge project setup with appropriate local dev environment settings #11

Merge project setup with appropriate local dev environment settings

Merge project setup with appropriate local dev environment settings #11

name: Use hotosm workflows for pull requests and pushes to main or release branches
on:
push:
branches:
- 'main'
- 'release/*'
pull_request:
branches:
- 'main'
- 'release/*'
jobs:
build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@main
with:
context: .
dockerfile: ${{ github.event_name == 'pull_request' && './Dockerfile.dev' || './Dockerfile.prod' }}
image_name: ghcr.io/${{ github.repository }}/backend
extra_build_args: |
APP_VERSION=${{ github.ref_name }}
COMMIT_REF=${{ github.sha }}
pytest:
uses: hotosm/gh-workflows/.github/workflows/test_pytest.yml@main
with:
build_context: .
build_dockerfile: ${{ github.event_name == 'pull_request' && './Dockerfile.dev' || './Dockerfile.prod' }}
image_name: ghcr.io/${{ github.repository }}/backend
extra_build_args: |
COMMIT_REF=${{ github.sha }}