forked from Somnia/SomniaRoomsApp
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
159ee1b004 | ||
|
|
e7ac0e8af6 | ||
|
|
5278d65e50 |
@@ -0,0 +1,23 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request: ~
|
||||||
|
workflow_dispatch: ~
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Docker Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Lint Dockerfile
|
||||||
|
uses: hadolint/[email protected]
|
||||||
@@ -18,6 +18,11 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -33,14 +38,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: daniel-garmig/somniaroomsapp:devbuild
|
tags: ${{vars.REGISTRY_INSTANCE}}/daniel-garmig/somniaroomsapp:devbuild
|
||||||
target: final-prod
|
target: final-prod
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
lint:
|
secrets: |
|
||||||
name: Docker Lint
|
GIT_AUTH_TOKEN=${{secrets.REGISTRY_TOKEN}}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Lint Dockerfile
|
|
||||||
uses: hadolint/[email protected]
|
|
||||||
|
|||||||
+1
-2
@@ -14,8 +14,7 @@ CMD ["npm", "run", "dev"]
|
|||||||
|
|
||||||
# Build app for production.
|
# Build app for production.
|
||||||
FROM app-base as builder
|
FROM app-base as builder
|
||||||
RUN npm ci
|
RUN npm ci && npm run build
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# production environment
|
# production environment
|
||||||
FROM nginx:stable-alpine as final-prod
|
FROM nginx:stable-alpine as final-prod
|
||||||
|
|||||||
Reference in New Issue
Block a user