-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.33 KB
/
docker-build-gateway.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
name: Docker Build and Push Gateway Images
on:
push:
branches:
- main
- fix-ci
pull_request:
permissions: write-all
jobs:
build-push-gateway:
runs-on: ubuntu-latest
strategy:
matrix:
application: [adapter, dataManager, AlerteDetector, pre-treatment, transmitter]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: downcase REPO name as output
id: downcase
run: |
echo "::set-output name=downcase::$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')"
- name: Build and push api image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
context: gateway/${{ matrix.application }}
tags: ghcr.io/${{ steps.downcase.outputs.downcase }}/gateway-${{ matrix.application }}:${{ github.sha }}, ghcr.io/${{ steps.downcase.outputs.downcase }}/gateway-${{ matrix.application }}:${{ github.ref_name }}