mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-01-07 09:48:43 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
cc5fe0859a
3 changed files with 61 additions and 11 deletions
69
.github/workflows/main.yml
vendored
69
.github/workflows/main.yml
vendored
|
@ -5,11 +5,13 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- openj9
|
- openj9
|
||||||
|
- openj9-11
|
||||||
- openj9-nightly
|
- openj9-nightly
|
||||||
- adopt11
|
- adopt11
|
||||||
- adopt13
|
- adopt13
|
||||||
- adopt14
|
- adopt14
|
||||||
- adopt15
|
- adopt15
|
||||||
|
- test/*
|
||||||
tags:
|
tags:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||||
|
@ -21,7 +23,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -32,20 +34,67 @@ jobs:
|
||||||
build:
|
build:
|
||||||
needs:
|
needs:
|
||||||
- test
|
- test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build and push Docker images
|
- name: Prepare
|
||||||
uses: docker/build-push-action@v1.1.0
|
id: prep
|
||||||
|
run: |
|
||||||
|
DOCKER_IMAGE=itzg/minecraft-server
|
||||||
|
VERSION=edge
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
fi
|
||||||
|
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||||
|
VERSION=${GITHUB_REF#refs/heads/}
|
||||||
|
if [[ $VERSION == master ]]; then
|
||||||
|
VERSION=latest
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||||
|
echo ::set-output name=tags::${TAGS}
|
||||||
|
echo ::set-output name=cache_from::${TAGS}
|
||||||
|
echo ::set-output name=version::${VERSION//\//-}
|
||||||
|
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
repository: itzg/minecraft-server
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
tag_with_ref: true
|
|
||||||
tag_with_sha: false
|
- name: Build and push
|
||||||
cache_froms: itzg/minecraft-server:latest
|
id: docker_build
|
||||||
add_git_labels: true
|
uses: docker/build-push-action@v2
|
||||||
labels: org.opencontainers.image.url=https://github.com/itzg/docker-minecraft-server,org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
# ensure latest base image is used
|
||||||
|
pull: true
|
||||||
|
# publish
|
||||||
push: true
|
push: true
|
||||||
|
# tags determined by prep step
|
||||||
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||||
|
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||||
|
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||||
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Image digest
|
||||||
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
|
@ -152,6 +152,7 @@ To use a different version of Java, please use a docker tag to run your Minecraf
|
||||||
| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux |
|
| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux |
|
||||||
| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux |
|
| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux |
|
||||||
| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux |
|
| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux |
|
||||||
|
| openj9-11 | Uses Eclipse OpenJ9 JVM for Java 11 | Alpine Linux |
|
||||||
| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux |
|
| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux |
|
||||||
| multiarch | Uses Java version 8 latest update | Debian Linux |
|
| multiarch | Uses Java version 8 latest update | Debian Linux |
|
||||||
| multiarch-latest | Uses Java version 15 latest update | Debian Linux |
|
| multiarch-latest | Uses Java version 15 latest update | Debian Linux |
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#set -x
|
#set -x
|
||||||
# Use this variable to indicate a list of branches that docker hub is watching
|
# Use this variable to indicate a list of branches that docker hub is watching
|
||||||
branches_list=('openj9' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest')
|
branches_list=('openj9' 'openj9-11' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest')
|
||||||
|
|
||||||
function TrapExit {
|
function TrapExit {
|
||||||
echo "Checking out back in master"
|
echo "Checking out back in master"
|
||||||
|
|
Loading…
Reference in a new issue