-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into at-units-in-multiple-languages
- Loading branch information
Showing
4 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish api-server Docker image to DockerHub | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: wiseberkeley/wise-api-server | ||
flavor: latest=true | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
14 changes: 9 additions & 5 deletions
14
.github/workflows/maven.yml → .github/workflows/release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
FROM maven:3.9.6-eclipse-temurin-17 | ||
# Generate wise-api-server Docker image | ||
|
||
# Stage 1: Build application | ||
FROM maven:3.9.6-eclipse-temurin-17 as build | ||
WORKDIR /app | ||
COPY . . | ||
RUN mvn package | ||
|
||
COPY pom.xml . | ||
RUN mvn dependency:go-offline | ||
|
||
COPY src/ /app/src/ | ||
|
||
CMD mvn spring-boot:run -Dspring-boot.run.profiles=dockerdev | ||
# Stage 2: Copy war | ||
FROM eclipse-temurin:17 | ||
COPY --from=build /app/target/wise.war wise.war | ||
ENTRYPOINT ["java","-jar","/wise.war", "--spring.config.location=/application.properties"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Generate wise-api-dev Docker image | ||
|
||
FROM maven:3.9.6-eclipse-temurin-17 | ||
WORKDIR /app | ||
COPY pom.xml . | ||
RUN mvn dependency:go-offline | ||
COPY src/ /app/src/ | ||
CMD mvn spring-boot:run -Dspring-boot.run.profiles=dockerdev |