Skip to content

Update email in election-guide.tsx #24

Update email in election-guide.tsx

Update email in election-guide.tsx #24

Workflow file for this run

name: Docker
on:
push:
branches:
- "master"
- "qa"
env:
IMAGE_NAME: ${{ github.ref_name == 'master' && 'website' || 'website-qa' }}
jobs:
build:
name: "Build (${{ matrix.component }})"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: true
matrix:
component: [backend, frontend]
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@v5
with:
context: ${{ matrix.component }}
push: ${{ github.event_name != 'pull_request' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/qa' ) }}
platforms: linux/amd64
file: ${{ matrix.component }}/Dockerfile
tags: |
ghcr.io/csesoc/${{ env.IMAGE_NAME }}-${{ matrix.component }}:${{ github.sha }}
ghcr.io/csesoc/${{ env.IMAGE_NAME }}-${{ matrix.component }}:latest
labels: ${{ steps.meta.outputs.labels }}
deploy:
name: Deploy (CD)
runs-on: ubuntu-latest
needs: [build]
concurrency: prod
environment:
name: prod
if: ${{ github.event_name != 'pull_request' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/qa' ) }}
steps:
- name: "Determine deployment type"
id: get_manifest
env:
BRANCH: ${{ github.ref }}
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "TYPE=prod" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == "refs/heads/qa" ]]; then
echo "TYPE=qa" >> $GITHUB_OUTPUT
else
exit 1
fi
- 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 }}
owner: csesoc
repository: deployment
ref: develop
updates: |
ghcr.io/csesoc/${{ env.IMAGE_NAME }}-backend=${{ github.sha }}
ghcr.io/csesoc/${{ env.IMAGE_NAME }}-frontend=${{ github.sha }}