Skip to content

Workflow file for this run

"on":
release:
types:
- created
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/unhcr-geneva-tech-hub-app-s3_server
- Dockerfile: ./rest-api/Dockerfile
context: ./rest-api
image: ghcr.io/epfl-enac/unhcr-geneva-tech-hub-app-rest-api
- Dockerfile: ./azure-cron/Dockerfile
context: ./azure-cron
image: ghcr.io/epfl-enac/unhcr-geneva-tech-hub-app-azure-cron
- Dockerfile: ./couchdb-setup/Dockerfile
context: ./couchdb-setup
image: ghcr.io/epfl-enac/unhcr-geneva-tech-hub-app-couchdb-setup
- Dockerfile: ./data-setup/Dockerfile
context: ./data-setup
image: ghcr.io/epfl-enac/unhcr-geneva-tech-hub-app-data-setup
- Dockerfile: ./frontend/Dockerfile
context: ./frontend
image: ghcr.io/epfl-enac/unhcr-geneva-tech-hub-app-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
file: ${{ matrix.dockerfile }}
tags: ${{ steps.meta.outputs.tags }},${{ matrix.image }}:${{ github.sha }},${{ matrix.image }}:latest,${{ matrix.image }}:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
needs: build-and-push-image
runs-on: ubuntu-latest
steps:
- uses: EPFL-ENAC/epfl-enac-deploy-action@main
with:
ENAC_IT4R_CD_environment: "prod"
ENAC_IT4R_CD_deployment_id: ${{ secrets.CD_PROD_ID }}
ENAC_IT4R_CD_deployment_secret: ${{ secrets.CD_PROD_SECRET }}
timeout: "10000"