-
Notifications
You must be signed in to change notification settings - Fork 19
59 lines (54 loc) · 1.83 KB
/
dockerimage.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
name: Build and Push Docker Image
on:
push:
branches:
- main
- multi-tenant
tags:
- '*'
jobs:
build-and-push-latest:
if: github.ref == 'refs/heads/main'
name: Build and Push Docker Image with Latest Tag
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Build and Publish the Docker Image as Latest
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: kartoza/kbims_uwsgi:latest
context: .
dockerfile: deployment/docker/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
buildoptions: "--target prod"
build-and-push-tag:
if: startsWith(github.ref, 'refs/tags/')
name: Build and Push Docker Image with Tag Name
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Build and Publish the Docker Image with Tag Name
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: kartoza/kbims_uwsgi:${{ github.ref_name }}
context: .
dockerfile: deployment/docker/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
buildoptions: "--target prod"
build-and-push-multi-tenant:
if: github.ref == 'refs/heads/multi-tenant'
name: Build and Push Docker Image with Multi-Tenant Tag
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Build and Publish the Docker Image as Multi-Tenant
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: kartoza/kbims_uwsgi:multi-tenant
context: .
dockerfile: deployment/docker/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
buildoptions: "--target prod"