feat: epfl style applied to admin ui #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# https://github.com/EPFL-ENAC/github-actions-runner#readme | |
name: deploy-prod | |
"on": | |
push: | |
branches: | |
- main | |
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/alice-ethz-arema-s3_server | |
- Dockerfile: ./uploadFASTAPI/Dockerfile | |
context: ./uploadFASTAPI | |
image: ghcr.io/epfl-enac/alice-ethz-arema-uploadfastapi | |
- Dockerfile: ./backend/Dockerfile | |
context: ./backend | |
image: ghcr.io/epfl-enac/alice-ethz-arema-backend | |
- Dockerfile: ./admin/Dockerfile | |
context: ./admin | |
image: ghcr.io/epfl-enac/alice-ethz-arema-admin | |
- Dockerfile: ./frontend/Dockerfile | |
context: ./frontend | |
image: ghcr.io/epfl-enac/alice-ethz-arema-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: Authenticate to GitHub Packages | |
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ${{ matrix.context }}/.npmrc | |
- 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 }} | |
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: "1000" |