Skip to content

Commit

Permalink
feat: add CI build and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wolverian committed Sep 11, 2024
1 parent 368481f commit d32587a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
node_modules
infra
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on:
push:
branches:
- main
- feat/cdk # remove before merging

jobs:
build:
name: Build

runs-on: ubuntu-latest

permissions:
contents: read
packages: write

env:
tag: todo

steps:
- uses: actions/checkout@v4
- run: |
tag=ghcr.io/opetushallitus/koto-rekisteri:$GITHUB_SHA
docker build -t $tag .
docker push $tag
- run: |
npm ci
npx cdk deploy --all
working-directory: infra
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM maven:3.9.9-amazoncorretto-21

WORKDIR /kitu

COPY . .

RUN mvn package -DskipTests

ENTRYPOINT ["java", "-jar", "target/kitu-0.0.1-SNAPSHOT.jar"]

0 comments on commit d32587a

Please sign in to comment.