Skip to content

Commit

Permalink
build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarence Mesina committed Nov 3, 2023
1 parent 7bf3948 commit e23094d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
# setup node
- uses: actions/setup-node@v3
with:
node-version: '20.8.1'
# install dependencies
- name: Install dependencies
run: |
yarn install --frozen-lockfile
# build application
- uses: mansagroup/nrwl-nx-action@v3
with:
targets: build-with-frontend
projects: hotel-management-system-backend
affected: false
# build and push to dockerhub
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64, linux/arm64/v8
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hotel-management-system:latest
file: ./dockerfile
context: .
File renamed without changes.

0 comments on commit e23094d

Please sign in to comment.