Skip to content

Commit

Permalink
Merge pull request #19 from KushParsaniya/feature/ci-cd
Browse files Browse the repository at this point in the history
Add docker config for github action.
  • Loading branch information
KushParsaniya authored Aug 27, 2024
2 parents d996ce6 + b5c8a9e commit fc683aa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,17 @@ jobs:
REDIS_HOST: ${{ vars.REDIS_HOST }}
REDIS_USER: ${{ vars.REDIS_USER }}
REDIS_PASS: ${{ vars.REDIS_PASS }}
REDIS_PORT: ${{ vars.REDIS_PORT }}
REDIS_PORT: ${{ vars.REDIS_PORT }}

- name: login to docker registry
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: build and push docker image to registry
uses: docker/build-push-action@v5
with:
context: Dockerfile
push: true
tags: kushparsaniya/spotify-youtube-sync-github-action:latest
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Use an official OpenJDK 21 runtime as a parent image
FROM eclipse-temurin:21-jdk

ADD target/spotify-youtube-sync-github-action.war spotify-youtube-sync-github-action.war

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run the WAR file using Tomcat
ENTRYPOINT ["java", "-jar", "/spotify-youtube-sync-github-action.war"]
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
</dependencies>

<build>
<finalName>spotify-youtube-sync-github-action</finalName>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
Expand Down

0 comments on commit fc683aa

Please sign in to comment.