-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (25 loc) · 1000 Bytes
/
dockerImageUploadMinecraft.yml
File metadata and controls
25 lines (25 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Minecraft Server - Docker Image CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: DockerHub login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image of HOSTING --> GAMES --> Minecraft & push to DockerHub
run: |
wget https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/info.json?at=refs%2Fheads%2Fmaster -O info.json
VERSION=$(cat info.json | jq '.minecraftVersion' | tr -d '"')
docker buildx build --push \
--tag 'redxlus/minecraft-server:SPIGOT-'$VERSION \
--tag 'redxlus/minecraft-server:latest' \
--file 'HOSTING/GAMES/Minecraft/Dockerfile' \
--platform linux/amd64 .