dockerfile and ci added

This commit is contained in:
2022-07-19 20:56:26 +02:00
committed by GitHub
parent 9fe07408cc
commit a08a021b76
2 changed files with 32 additions and 0 deletions

19
.github/workflows/dockerpush.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Push to docker.
on: [push] # When pushing to any branch then run this action
# Env variable
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
REPO_NAME: ${{secrets.REPO_NAME}}
jobs:
push-image-to-docker-hub: # job name
runs-on: ubuntu-latest # runner name : (ubuntu latest version)
steps:
- uses: actions/checkout@v2 # first action : checkout source code
- name: docker login
run: | # log into docker hub account
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build the Docker image # push The image to the docker hub
run: docker build . --file Dockerfile --tag $DOCKER_USER/$REPO_NAME:latest
- name: Docker Push
run: docker push $DOCKER_USER/$REPO_NAME:latest

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM node:alpine
RUN apk update
RUN apk add openjdk13 wget
RUN mkdir /lavalink
RUN cd /lavalink && wget https://github.com/freyacodes/Lavalink/raw/master/LavalinkServer/application.yml.example -O application.yml
RUN cd /lavalink && wget https://ci.fredboat.com/repository/download/Lavalink_Build/9447:id/Lavalink.jar
CMD cd /lavalink && java -jar Lavalink.jar