mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 14:22:27 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Build and Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- openj9
|
|
- openj9-nightly
|
|
- adopt11
|
|
- adopt13
|
|
tags:
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
|
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
|
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
|
- "[0-9]+.[0-9]+.[0-9]+-adopt13"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run tests
|
|
run: |
|
|
tests/test.sh
|
|
build:
|
|
needs:
|
|
- test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build and push Docker images
|
|
uses: docker/build-push-action@v1.1.0
|
|
with:
|
|
repository: itzg/minecraft-server
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
tag_with_ref: true
|
|
tag_with_sha: false
|
|
cache_froms: itzg/minecraft-server:latest
|
|
add_git_labels: true
|
|
labels: org.opencontainers.image.url=https://github.com/itzg/docker-minecraft-server,org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
|
push: true
|