-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into extend_datetime_search
- Loading branch information
Showing
15 changed files
with
354 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" # Triggers when a tag like 'v3.2.0' is pushed | ||
|
||
jobs: | ||
build-and-publish-pypi: | ||
name: Build and Publish Packages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish stac-fastapi-core | ||
working-directory: stac_fastapi/core | ||
env: | ||
TWINE_USERNAME: "__token__" | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
# Build package | ||
python setup.py sdist bdist_wheel | ||
# Publish to PyPI | ||
twine upload dist/* | ||
- name: Build and publish stac-fastapi-elasticsearch | ||
working-directory: stac_fastapi/elasticsearch | ||
env: | ||
TWINE_USERNAME: "__token__" | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
# Build package | ||
python setup.py sdist bdist_wheel | ||
# Publish to PyPI | ||
twine upload dist/* | ||
- name: Build and publish stac-fastapi-opensearch | ||
working-directory: stac_fastapi/opensearch | ||
env: | ||
TWINE_USERNAME: "__token__" | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
# Build package | ||
python setup.py sdist bdist_wheel | ||
# Publish to PyPI | ||
twine upload dist/* | ||
build-and-push-images: | ||
name: Build and Push Docker Images | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata for Elasticsearch image | ||
id: meta-es | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/stac-fastapi-es | ||
tags: | | ||
type=raw,value=latest | ||
type=ref,event=tag | ||
- name: Push Elasticsearch image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: dockerfiles/Dockerfile.ci.es | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta-es.outputs.tags }} | ||
labels: ${{ steps.meta-es.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Extract metadata for OpenSearch image | ||
id: meta-os | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/stac-fastapi-os | ||
tags: | | ||
type=raw,value=latest | ||
type=ref,event=tag | ||
- name: Push OpenSearch image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: dockerfiles/Dockerfile.ci.os | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta-os.outputs.tags }} | ||
labels: ${{ steps.meta-os.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:3.12-slim | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
curl \ | ||
&& apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /app/ | ||
|
||
RUN pip3 install --no-cache-dir -e ./stac_fastapi/core && \ | ||
pip3 install --no-cache-dir ./stac_fastapi/elasticsearch[server] | ||
|
||
USER root | ||
|
||
CMD ["python", "-m", "stac_fastapi.elasticsearch.app"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:3.12-slim | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
curl \ | ||
&& apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /app/ | ||
|
||
RUN pip3 install --no-cache-dir -e ./stac_fastapi/core && \ | ||
pip3 install --no-cache-dir ./stac_fastapi/opensearch[server] | ||
|
||
USER root | ||
|
||
CMD ["python", "-m", "stac_fastapi.opensearch.app"] |
Oops, something went wrong.