Skip to content

Merge pull request #35 from CMCC-Foundation/feature_34 #10

Merge pull request #35 from CMCC-Foundation/feature_34

Merge pull request #35 from CMCC-Foundation/feature_34 #10

name: Build geolake docker images for geolake components and push to the repository
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source for drivers
run: python3 -m build ./drivers
- name: Get release tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Login to Scaleway Container Registry
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ vars.GEOLAKE_REGISTRY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push drivers
uses: docker/build-push-action@v5
with:
context: ./drivers
file: ./drivers/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.GEOKUBE_REGISTRY }}
TAG=v0.2a6
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ vars.GEOLAKE_REGISTRY }}/geolake-drivers:${{ env.RELEASE_TAG }}
- name: Build and push datastore component
uses: docker/build-push-action@v5
with:
context: ./datastore
file: ./datastore/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.GEOLAKE_REGISTRY }}
TAG=${{ env.RELEASE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ vars.GEOLAKE_REGISTRY }}/geolake-datastore:${{ env.RELEASE_TAG }}
- name: Build and push api component
uses: docker/build-push-action@v5
with:
context: ./api
file: ./api/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.GEOLAKE_REGISTRY }}
TAG=${{ env.RELEASE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ vars.GEOLAKE_REGISTRY }}/geolake-api:${{ env.RELEASE_TAG }}
- name: Build and push executor component
uses: docker/build-push-action@v5
with:
context: ./executor
file: ./executor/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.GEOLAKE_REGISTRY }}
TAG=${{ env.RELEASE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ vars.GEOLAKE_REGISTRY }}/geolake-executor:${{ env.RELEASE_TAG }}