Skip to content

Commit fc25fe4

Browse files
author
Sidney Andrews
committed
Push to Docker Hub
1 parent d69a3af commit fc25fe4

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/automation.yml

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
name: Build Next.js web application
22
on: push
33
jobs:
4+
build-container:
5+
name: Build container
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@v2
10+
- name: Push to Docker Hub
11+
uses: docker/build-push-action@v1
12+
with:
13+
username: ${{ secrets.DOCKER_USERNAME }}
14+
password: ${{ secrets.DOCKER_PASSWORD }}
15+
repository: msusdev/webnext
16+
tags: ${{ github.run_number }}, latest
417
build-project:
518
name: Build Next.js project
619
runs-on: ubuntu-latest

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:alpine
2+
3+
WORKDIR /app
4+
5+
COPY . /app
6+
7+
RUN npm install
8+
RUN npm run build
9+
10+
EXPOSE 3000
11+
12+
CMD npm run start

0 commit comments

Comments
 (0)