-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (49 loc) · 1.58 KB
/
cd-docker-publish.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
name: docker-publish
run-name: Docker Publish
on:
workflow_run:
workflows: ["tests"]
types:
- completed
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
image:
- name: API Gateway
context: ./api-gateway/
tag: antonioscardace/api-gateway:latest
- name: Data Manager
context: ./data-manager/
tag: antonioscardace/data-manager:latest
- name: Spark Metadata
context: ./spark-metadata/
tag: antonioscardace/spark-metadata:latest
- name: User Interface
context: ./user-interface/
tag: antonioscardace/user-interface:latest
#---------------------------------#
# Build and Push Docker Image #
# on the DockerHub Registry #
#---------------------------------#
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into Docker Hub registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
tags: ${{ matrix.image.tag }}
context: ${{ matrix.image.context }}
push: true