Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Formage Container Image CI
on:
push:
branches: [ "main","dev" ]
tags: 'v.*.*'
tags: 'v*.*'

jobs:

Expand All @@ -16,6 +16,7 @@ jobs:
strategy:
matrix:
python_version: ["3.12", "3.13"]
pyfvs_version: ["main","dev","0.3.4"]

steps:
- name: Checkout repository
Expand All @@ -32,7 +33,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-py${{ matrix.python_version }}
images: ghcr.io/${{ github.repository }}-py${{ matrix.python_version }}-pyfvs${{ matrix.pyfvs_version }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand All @@ -44,4 +45,5 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PYTHON_VER=${{ matrix.python_version }}
PYTHON_VER=${{ matrix.python_version }}
PYFVS_VER=${{ matrix.pyfvs_version }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Forest Modeling Container Image
Combines multiple packages used for forest modeling

# Packages Included
PyFVS (main)[https://github.com/forest-modeling/PyFVS]
PyNVEL (main)[https://github.com/forest-modeling/PyNVEL]
PySiteIndex (main)[https://github.com/forest-modeling/PySiteIndex]
PyFVS - [main](https://github.com/forest-modeling/PyFVS),[v0.3.3](https://github.com/forest-modeling/PyFVS/releases/tag/v0.3.3),[v0.3.4](https://github.com/forest-modeling/PyFVS/releases/tag/v0.3.4),[dev](https://github.com/forest-modeling/PyFVS/tree/dev)
PyNVEL [main](https://github.com/forest-modeling/PyNVEL)
PySiteIndex [main](https://github.com/forest-modeling/PySiteIndex)
9 changes: 6 additions & 3 deletions formage.containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ ARG PYTHON_VER

FROM python:${PYTHON_VER}-$OS_TAG AS builder

ARG PYFVS_VERSION=main
ARG PYFVS_VER
ARG PYNVEL_VERSION=main
ARG PYSITEINDEX_VERSION=main
# FVS variant libraries to build, must be lowercase
ARG FVS_VARIANTS=pn,wc,ca,so,op,oc,ec,nc,bm,ie,ci,ak,ws
#,em,tt,cr,ut,ls,cs,sn,ne
# ARG FVS_VARIANTS=pn,wc,ca,so
# ARG PYFVS_VERSION=v0.3.2

ARG ROOT=/formage

Expand Down Expand Up @@ -43,7 +42,11 @@ RUN git clone https://github.com/forest-modeling/PyFVS.git --recurse-submodules

WORKDIR "$ROOT/PyFVS"

RUN git checkout "${PYFVS_VERSION}"
# RUN if [[ "$PYFVS_VER" =~ ^[0-9] ]]; then git checkout "v$PYFVS_VER"; else git checkout "$PYFVS_VER"; fi
RUN if echo "$PYFVS_VER" | grep -q '^[0-9]'; \
then git checkout --recurse-submodules "v$PYFVS_VER"; \
else git checkout --recurse-submodules "$PYFVS_VER"; \
fi
RUN python -m pip install . \
--verbose --no-build-isolation \
--config-settings=setup-args="-Dfvsvariants=$FVS_VARIANTS"
Expand Down
Loading