Skip to content

fix(deps): update dependency @nestjs/microservices to v11 [security] … #741

fix(deps): update dependency @nestjs/microservices to v11 [security] …

fix(deps): update dependency @nestjs/microservices to v11 [security] … #741

Workflow file for this run

name: Docker
on:
push:
branches:
- dev
- staging
env:
ENVIRONMENT: ${{ github.ref_name == 'dev' && 'prod' || 'staging' }}
IMAGE_NAME: ${{ github.ref_name == 'dev' && 'notangles' || 'notangles-staging' }}
jobs:
build-client:
name: 'Build (Client)'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: client
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
platforms: linux/amd64
file: client/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
CLARITY_PROJECT_ID=${{ secrets.CLARITY_PROJECT_ID }}
GIT_COMMIT=${{ github.sha }}
tags: |
ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-client:${{ github.sha }}
ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-client:latest
labels: ${{ steps.meta.outputs.labels }}
build:
name: 'Build (${{ matrix.component }})'
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
component: [server, auto_server]
include:
- component: server
name: backend
- component: auto_server
name: auto-timetabler-server
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.component }}
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
platforms: linux/amd64
file: ${{ matrix.component }}/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-${{ matrix.name }}:${{ github.sha }}
ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-${{ matrix.name }}:latest
labels: ${{ steps.meta.outputs.labels }}
deploy:
name: Deploy (CD)
runs-on: ubuntu-latest
needs: [build-client, build]
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
concurrency: production
environment: production
steps:
- name: Dispatch deployment
uses: devsoc-unsw/deployment-dispatch-action@main
with:
deployment-dispatcher-app-id: ${{ vars.DEPLOYMENT_DISPATCHER_APP_ID }}
deployment-dispatcher-app-private-key: ${{ secrets.DEPLOYMENT_DISPATCHER_APP_PRIVATE_KEY }}
updates: |
ghcr.io/devsoc-unsw/notangles-client=${{ github.sha }}
ghcr.io/devsoc-unsw/notangles-backend=${{ github.sha }}
ghcr.io/devsoc-unsw/notangles-auto-timetabler-server=${{ github.sha }}