Skip to content

chore(build): add other tags #14

chore(build): add other tags

chore(build): add other tags #14

---
# 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: 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 }},${{ matrix.image }}:${{ github.sha }},${{ matrix.image }}:latest
labels: ${{ steps.meta.outputs.labels }}