-
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 pull request #103 from Foxikle/fix/redis-reliablility
Create dockerfile and corresponding action
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
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,47 @@ | ||
name: Build and push Docker Image | ||
run-name: Deploy Docker image to GHCR by @${{ github.actor }} | ||
|
||
env: | ||
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '21' | ||
|
||
# - run: chmod +x gradlew | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Assemble Jar | ||
run: ./gradlew -Dorg.gradle.jvmargs=--enable-preview assemble | ||
env: | ||
REPO_USERNAME: ${{ secrets.REPO_USERNAME }} | ||
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} | ||
|
||
- name: Build Docker Image | ||
run: docker build -t cytosis -f docker/basic/Dockerfile . | ||
|
||
- name: Tag Docker Image | ||
run: docker tag cytosis ghcr.io/cytonicmc/cytosis:latest | ||
|
||
- name: Login to GHCR | ||
run: echo $GHCR_TOKEN | docker login ghcr.io -u CytonicMC --password-stdin | ||
|
||
- name: Push Docker Image | ||
run: docker push ghcr.io/cytonicmc/cytosis:latest | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM eclipse-temurin:21-jre-jammy | ||
LABEL authors="CytonicMC" | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy cytosis Jar | ||
COPY ../../build/libs/cytosis.jar . | ||
|
||
# Expose the port | ||
EXPOSE 25565 | ||
|
||
# Run the java | ||
CMD ["java", "-DSERVER_PORT=25565", "-jar", "--enable-preview", "cytosis.jar"] |