Skip to content

Commit ce0f756

Browse files
committed
Adds docker container build
1 parent cd247cd commit ce0f756

File tree

4 files changed

+53
-23
lines changed

4 files changed

+53
-23
lines changed

.docker/ nginx.conf

Lines changed: 0 additions & 22 deletions
This file was deleted.

.docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ RUN npm i
1515
RUN npm run docs:build
1616

1717
FROM nginx:alpine as server
18-
COPY --from=node /app/docs/.vitepress/dist /app
18+
19+
COPY --from=node /app/docs/.vitepress/dist /usr/share/nginx/html

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
patreon: butschster

.github/workflows/docker-image.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Docker Image CI
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build-release:
10+
if: "!github.event.release.prerelease"
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: 'Get Previous tag'
17+
id: previoustag
18+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
19+
with:
20+
fallback: v0.1
21+
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ secrets.GHCR_LOGIN }}
27+
password: ${{ secrets.GHCR_PASSWORD }}
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v2
31+
32+
- name: Set up Docker Buildx
33+
id: buildx
34+
uses: docker/setup-buildx-action@v2
35+
36+
- name: Build and push
37+
id: docker_build
38+
uses: docker/build-push-action@v3
39+
with:
40+
context: ./
41+
platforms: linux/amd64,linux/arm64
42+
file: ./.docker/Dockerfile
43+
push: true
44+
build-args: |
45+
APP_VERSION=${{ steps.previoustag.outputs.tag }}
46+
FRONTEND_IMAGE_TAG=latest
47+
tags:
48+
ghcr.io/${{ github.repository }}:latest, ghcr.io/${{ github.repository }}:${{ steps.previoustag.outputs.tag }}

0 commit comments

Comments
 (0)