Skip to content

Merge pull request #4 from CS3219-AY2324S1/deployment-init #1

Merge pull request #4 from CS3219-AY2324S1/deployment-init

Merge pull request #4 from CS3219-AY2324S1/deployment-init #1

name: Build Docker Images
on:
workflow_dispatch:
push:
branches:
- master
env:
FRONTEND_IMAGE_NAME: peerprep-frontend
NGINX_IMAGE_NAME: peerprep-nginx
jobs:
build-frontend-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out Source
uses: actions/checkout@v2
- name: Log in to the Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ay2324s1-course-assessment-g21
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: deployment/Dockerfile-frontend
push: true
tags: ghcr.io/ay2324s1-course-assessment-g21/${{ env.FRONTEND_IMAGE_NAME }}:latest
build-nginx-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out Source
uses: actions/checkout@v2
- name: Log in to the Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ay2324s1-course-assessment-g21
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: deployment/Dockerfile-nginx
push: true
tags: ghcr.io/ay2324s1-course-assessment-g21/${{ env.NGINX_IMAGE_NAME }}:latest