Skip to content

Commit

Permalink
Merge pull request #18 from wpreimes/master
Browse files Browse the repository at this point in the history
Workflow updates
  • Loading branch information
wpreimes authored Oct 13, 2024
2 parents 0f16a5a + fa91728 commit 7562d85
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 58 deletions.
57 changes: 49 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ on:

jobs:
build:
name: py${{ matrix.python-version }} @ ${{ matrix.os }}
name: py${{ matrix.python-version }}@${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: "ubuntu-latest"
python-version: '3.8' # first supported
# - os: "windows-latest"
# python-version: '3.8' # first supported
- os: "ubuntu-latest"
python-version: '3.12' # latest supported
- os: "windows-latest"
Expand Down Expand Up @@ -89,8 +87,9 @@ jobs:
python setup.py sdist --dist-dir artifacts/dist
fi
ls artifacts/dist
coveralls:
name: Submit Coveralls 👚
publish-coverage:
name: Publish Coverage 👚
needs: build
runs-on: ubuntu-latest
container: python:3-slim
Expand All @@ -100,8 +99,10 @@ jobs:
pip3 install --upgrade coveralls && coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Upload to PyPI 🚀

publish-pypi-package:
name: Publish PyPI 🚀
# Will only trigger when the Tests have passed, and this is a release / tag branch from the TUW-GEO repository
if: startsWith(github.ref, 'refs/tags/v') && startsWith(github.repository, 'TUW-GEO')
needs: build
runs-on: ubuntu-latest
Expand All @@ -126,4 +127,44 @@ jobs:
verify_metadata: true
packages_dir: Artifacts/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets

publish-docker-image:
name: Publish Docker 📦
# Will only trigger when the Tests have passed, and this is a release / tag branch from the TUW-GEO repository
if: startsWith(github.ref, 'refs/tags/v') && startsWith(github.repository, 'TUW-GEO')
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
45 changes: 0 additions & 45 deletions .github/workflows/docker.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ RUN micromamba install -y -n base -f /app/environment.yml && pip install /app/.
RUN micromamba clean --all --yes

# Clean up the src code, as it is installed now
RUN rm -rf smos
RUN rm -rf /app

ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"]
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ Before installing this package via pip, please install the necessary

.. code::
$ conda install -c conda-forge netcdf4 pyresample
$ conda create -n smos python=3.12
$ conda env update -f environment.yml -n smos
Then
Expand Down Expand Up @@ -86,9 +87,9 @@ Supported Products
Currently the following products are supported, additional products can be
added.

- `SMOS IC <https://www.catds.fr/Products/Available-products-from-CEC-SM/SMOS-IC>`_: SMOS INRA-CESBIO (SMOS-IC) 25km
- `SMOS L4 RZSM <https://www.catds.fr/Products/Available-products-from-CEC-SM/L4-Land-research-products>`_: SMOS CATDS-CESBIO (SMOS L4 RZSM) 25km
- SMOS L2
- `SMOS IC <https://www.catds.fr/Products/Available-products-from-CEC-SM/SMOS-IC>`_: SMOS INRA-CESBIO (SMOS-IC) 25 km
- `SMOS L4 RZSM <https://www.catds.fr/Products/Available-products-from-CEC-SM/L4-Land-research-products>`_: SMOS CATDS-CESBIO (SMOS L4 RZSM) 25 km
- `SMOS L2 Science Product <https://earth.esa.int/eogateway/catalog/smos-science-products>`_: SMOS L2 Science Products (MIR_SMUDP2) 25 km
- SMOS L3

Build Docker image
Expand Down

0 comments on commit 7562d85

Please sign in to comment.