-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (76 loc) · 2.6 KB
/
build-staging.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build Docker images for geolake components and push to the repository
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
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: Set Docker image tag name
run: echo "TAG=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV
- name: Login to Scaleway Container Registry
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ vars.STAGING_DOCKER_REGISTRY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push drivers
uses: docker/build-push-action@v4
with:
context: ./drivers
file: ./drivers/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.STAGING_DOCKER_REGISTRY }}
tags: |
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-drivers:${{ env.TAG }}
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-drivers:latest
- name: Build and push datastore component
uses: docker/build-push-action@v4
with:
context: ./datastore
file: ./datastore/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.STAGING_DOCKER_REGISTRY }}
tags: |
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-datastore:${{ env.TAG }}
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-datastore:latest
- name: Build and push api component
uses: docker/build-push-action@v4
with:
context: ./api
file: ./api/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.STAGING_DOCKER_REGISTRY }}
tags: |
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-api:${{ env.TAG }}
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-api:latest
- name: Build and push executor component
uses: docker/build-push-action@v4
with:
context: ./executor
file: ./executor/Dockerfile
push: true
build-args: |
REGISTRY=${{ vars.STAGING_DOCKER_REGISTRY }}
tags: |
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-executor:${{ env.TAG }}
${{ vars.STAGING_DOCKER_REGISTRY }}/geolake-executor:latest