Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflows #4

Merged
merged 10 commits into from
Jan 28, 2024
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
33 changes: 0 additions & 33 deletions .github/workflows/build-push-docker-prod.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker image of the GEOKUBE component and push to the dev repository
name: Build geokube Docker image and push to geokube container registry

on:
pull_request:
Expand All @@ -13,7 +13,7 @@ jobs:
run: echo "TAG=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV
- uses: actions/setup-python@v1
with:
python-version: 3.11
python-version: 3.9
- name: Install WHEEL tool
run: pip install wheel
- name: Build WHEEL file
Expand All @@ -22,8 +22,8 @@ jobs:
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ secrets.DOCKER_DEV_REPO_URL }}
password: ${{ secrets.SCALEWAY_PASSWORD }}
registry: ${{ vars.GEOKUBE_REGISTRY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
Expand All @@ -33,5 +33,5 @@ jobs:
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKER_DEV_REPO_URL }}/geokube:${{ env.TAG }}
${{ secrets.DOCKER_DEV_REPO_URL }}/geokube:latest
${{ vars.GEOKUBE_REGISTRY }}/geokube:${{ env.TAG }}
${{ vars.GEOKUBE_REGISTRY }}/geokube:latest
35 changes: 35 additions & 0 deletions .github/workflows/build-push-docker_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build on release a geokube Docker image and push to the geokube container registry

on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get release tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install WHEEL tool
run: pip install wheel
- name: Build WHEEL file
run: python setup.py bdist_wheel
- name: Login to Scaleway Container Registry
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.SCALEWAY_PASSWORD }}
registry: ${{ vars.GEOKUBE_REGISTRY }}
- name: Set up Docker Buildx
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ vars.GEOKUBE_REGISTRY }}/geokube:${{ env.TAG }}
30 changes: 30 additions & 0 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Kit4DL package to PyPI

on:
release:
types: [published]
workflow_dispatch:

jobs:
build-and-publish:
name: Build Kit4DL and publish to PyPI
strategy:
matrix:
python-version: ["3.9"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install build tool
run: python3 -m pip install build --user
- name: Build wheels
run: python -m build --sdist --wheel --outdir=dist/ .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
34 changes: 34 additions & 0 deletions .github/workflows/testpypi_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish geokube package to TestPyPI

on:
release:
types: [prereleased]
workflow_dispatch:

jobs:
build-and-publish:
name: Build geokube and publish to TestPyPI
strategy:
matrix:
python-version: ["3.9"]
os: [ubuntu-latest]
# environment:
# name: testpypi
# url: https://test.pypi.org/p/geokube
permissions:
id-token: write
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install build tool
run: python3 -m pip install build --user
- name: Build wheels
run: python -m build --sdist --wheel --outdir=dist/ .
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN conda clean -afy \
&& find /opt/conda/ -follow -type f -name '*.pyc' -delete \
&& find /opt/conda/ -follow -type f -name '*.js.map' -delete \
&& find /opt/conda/lib/python*/site-packages/bokeh/server/static -follow -type f -name '*.js' ! -name '*.min.js' -delete
COPY dist/geokube-0.2a0-py3-none-any.whl /
COPY dist/geokube-0.2.7-py3-none-any.whl /
RUN pip install /geokube-0.2a0-py3-none-any.whl
RUN rm /geokube-0.2a0-py3-none-any.whl
ENV LD_LIBRARY_PATH=/opt/conda/x86_64-conda-linux-gnu/lib:/usr/lib/x86_64-linux-gnu
RUN rm /geokube-0.2.7-py3-none-any.whl
ENV LD_LIBRARY_PATH=/opt/conda/x86_64-conda-linux-gnu/lib:/usr/lib/x86_64-linux-gnu
2 changes: 1 addition & 1 deletion geokube/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2a0"
__version__ = "0.2.0"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
description="Python package for Earth Science Data Analysis",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/geokube/geokube",
url="https://github.com/CMCC-Foundation/geokube",
packages=setuptools.find_packages(),
install_requires=[
"pytest-cov",
Expand Down
Loading