Skip to content

feat(buildx): reorder build #10

feat(buildx): reorder build

feat(buildx): reorder build #10

---
# https://github.com/EPFL-ENAC/github-actions-runner#readme
name: Build & publish alice-ethz-arema images
# "on":
# push:
# tags:
# - 'v*'
on: [push]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- Dockerfile: ./s3_server/Dockerfile
context: ./s3_server
image: ghcr.io/EPFL-ENAC/s3_server
- Dockerfile: ./uploadFASTAPI/Dockerfile
context: ./uploadFASTAPI
image: ghcr.io/EPFL-ENAC/uploadFASTAPI
- Dockerfile: ./backend/Dockerfile
context: ./backend
image: ghcr.io/EPFL-ENAC/backend
- Dockerfile: ./admin/Dockerfile
context: ./admin
image: ghcr.io/EPFL-ENAC/admin
- Dockerfile: ./frontend/Dockerfile
context: ./frontend
image: ghcr.io/EPFL-ENAC/frontend
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm64/v8
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and push Docker image EPFL-ENAC.Agent.Service
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
push: true
build-args: |
"API_PATH=${{ secrets.API_PATH }}"
"API_URL=${{ secrets.API_URL }}"
file: ${{ matrix.dockerfile }}
tags: ${{ steps.meta.outputs.tags }},${{ github.sha }},latest
labels: ${{ steps.meta.outputs.labels }}