Add method to image #57
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
name: Build geokube Docker image and push to geokube container registry | |
on: | |
pull_request: | |
paths: | |
- geokube/** | |
- Dockerfile | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Docker image tag name | |
run: echo "TAG=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV | |
- name: TAG ECHO | |
run: echo ${{ env.TAG }} | |
- uses: actions/setup-python@v1 | |
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@v3 | |
with: | |
username: nologin | |
password: ${{ secrets.SCALEWAY_PASSWORD }} | |
registry: ${{ vars.GEOKUBE_REGISTRY }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- 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.TAG }} | |
${{ vars.GEOKUBE_REGISTRY }}/geokube:latest |