Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker config for github action. #19

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading