-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed redundant `setup.py` file. `pip install`, for example, will prefer the pyproject.toml file, and we didn't notice that file exists, so we were confused for too long about why our changes to `setup.py` were not "registering". * Add pdgstaging dependency to `pyproject.toml` Co-Authored-By: Rushiraj Nenuji <nenuji@nceas.ucsb.edu>
- Loading branch information
1 parent
fbfa06d
commit 977ff86
Showing
4 changed files
with
61 additions
and
41 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,45 @@ | ||
name: "Build and publish container image" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
|
||
env: | ||
REGISTRY: "ghcr.io" | ||
IMAGE_NAME: "${{ github.repository_owner }}/pdgraster" | ||
IMAGE_TAG: "${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}" | ||
|
||
|
||
jobs: | ||
|
||
build-and-release-image: | ||
name: "Build and release container image" | ||
runs-on: "ubuntu-latest" | ||
|
||
permissions: | ||
packages: "write" | ||
attestations: "write" | ||
|
||
steps: | ||
- name: "Check out repository" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Build container image" | ||
run: | | ||
docker build --tag "${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" . | ||
- name: "GHCR login" | ||
uses: "docker/login-action@v2" | ||
with: | ||
registry: "${{ env.REGISTRY }}" | ||
username: "${{ github.repository_owner }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: "Push to GHCR" | ||
run: | | ||
docker push "${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" |
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,14 @@ | ||
FROM python:3.10-slim | ||
|
||
# Install transitive dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y git libspatialindex-dev libgdal-dev libproj-dev | ||
|
||
# Add source | ||
WORKDIR /app | ||
ADD . . | ||
|
||
# Install pdgraster from source | ||
RUN pip install . | ||
|
||
CMD ["python"] |
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