-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e70d23
commit c1b4d06
Showing
4 changed files
with
123 additions
and
0 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: "CI Develop" | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!main' | ||
- '!master' | ||
paths: | ||
- '**' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: normalize branch name for tagging | ||
run: | | ||
NORM_TAG=$(echo "$GITHUB_REF_NAME" | tr -s "/" "-") | ||
echo "NORM_TAG=$NORM_TAG" >> $GITHUB_ENV | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push on GitHub packages | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:${{ env.NORM_TAG }} |
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,36 @@ | ||
name: "CI RCs - PROD" | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
- '*-rc' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: normalize branch name for tagging | ||
run: | | ||
NORM_TAG=$(echo "$GITHUB_REF_NAME" | tr -s "/" "-") | ||
echo "NORM_TAG=$NORM_TAG" >> $GITHUB_ENV | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push on GitHub packages | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:${{ env.NORM_TAG }} |
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,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
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,16 @@ | ||
## BUILD ## | ||
FROM maven:3.8.3-openjdk-17 AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN mvn -q clean package -Dmaven.test.skip=true | ||
|
||
|
||
## RUN ## | ||
FROM openjdk:17-alpine | ||
|
||
COPY --from=build /app/target/*.jar /app/app.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "/app/app.jar"] |