Skip to content

Commit b20aff9

Browse files
committed
ci: add Docker build Github workflow
1 parent 58de05c commit b20aff9

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/nodejs.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Docker images
2+
on: push
3+
jobs:
4+
build-and-push-docker-images:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout repository
8+
uses: actions/checkout@v3
9+
10+
- name: Set up QEMU
11+
uses: docker/setup-qemu-action@master
12+
with:
13+
platforms: all
14+
- name: Set up Docker Buildx
15+
id: buildx
16+
uses: docker/setup-buildx-action@master
17+
18+
- name: Login to DockerHub
19+
uses: docker/login-action@v1
20+
with:
21+
username: ${{ secrets.DOCKER_USERNAME }}
22+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
23+
24+
- name: Build Docker images
25+
uses: docker/build-push-action@v2
26+
with:
27+
builder: ${{ steps.buildx.outputs.name }}
28+
context: .
29+
file: ./Dockerfile
30+
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le
31+
push: true
32+
tags: johanbook/file-domain-server:latest

server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@ function handleRequest(req, res) {
6161

6262
const server = http.createServer(handleRequest);
6363
server.listen(PORT);
64+
65+
console.info(`Listening on port ${PORT}`)

0 commit comments

Comments
 (0)