-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
43 additions
and
2 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/ Cd Quizmate | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ['self-hosted', 'Linux', 'X64' ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: stop old container | ||
run: sudo docker container stop quizmate-container || true | ||
- name: Delete old container | ||
run: sudo docker container rm quizmate-container|| true | ||
- name: Delete old image | ||
run: sudo docker image rm quizmate || true | ||
|
||
|
||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
|
||
- name: Build the Docker image | ||
run: sudo docker build -t quizmate . | ||
- name: Run docker image | ||
run: sudo docker run -d -p 8080:8080 --name quizmate-container quizmate |
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ spring.mail.port=587 | |
spring.mail.username=[email protected] | ||
spring.mail.password=dyxwysgcrtlszoys | ||
spring.mail.properties.mail.smtp.auth=true | ||
spring.mail.properties.mail.smtp.starttls.enable=true | ||
spring.mail.properties.mail.smtp.starttls.enable=true |
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