Skip to content

Merge pull request #18 from CMCC-Foundation/add_method_to_image #9

Merge pull request #18 from CMCC-Foundation/add_method_to_image

Merge pull request #18 from CMCC-Foundation/add_method_to_image #9

name: Build on release a geokube Docker image and push to the geokube container registry
on:
push:
tags:
- 'v*'
workflow_dispatch:
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: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ vars.GEOKUBE_REGISTRY }}/geokube:${{ env.RELEASE_TAG }}