generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (27 loc) · 1.01 KB
/
front-end.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build and Push front-end image to GitLab Container Registry
on:
workflow_dispatch:
push:
branches:
- master # Adjust this to the branch you want to trigger the workflow on
paths:
# github workflow will only trigger at the exact path
# add "**" at the end of the path so that any changes to sub-directories will be triggered
- "front-end/peer-prep/**"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitLab Container Registry
run: docker login registry.gitlab.com -u ${{ secrets.GITLAB_USERNAME }} -p ${{ secrets.DOCKER}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: front-end/peer-prep
file: ./front-end/peer-prep/Dockerfile.prod
push: true
tags: registry.gitlab.com/peerprepgroup51sem1y2023/docker/frontend:latest