Build Purpur #1479
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
name: Build Purpur | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- purpur/** | |
- bin/** | |
- .github/workflows/purpur.yml | |
schedule: | |
- cron: "0 */12 * * *" | |
jobs: | |
build: | |
name: purpur-${{ matrix.runtime.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
runtime: | |
- image: eclipse-temurin:17-jre-jammy | |
name: temurin17-jammy | |
version: 17 | |
platform: linux/amd64,linux/arm64/v8 | |
os: debian | |
- image: eclipse-temurin:11-jre-jammy | |
name: temurin11-jammy | |
version: 11 | |
platform: linux/amd64,linux/arm64/v8 | |
os: debian | |
- image: eclipse-temurin:8-jre-jammy | |
name: temurin8-jammy | |
version: 8 | |
platform: linux/amd64,linux/arm64/v8 | |
os: debian | |
- image: eclipse-temurin:17-alpine | |
name: temurin17-alpine | |
version: 17 | |
platform: linux/amd64 | |
os: alpine | |
fail-fast: false | |
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 | |
with: | |
driver-opts: image=moby/buildkit:master | |
- name: Log in to ghcr.io | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set variables | |
id: vars | |
run: | | |
REPOSITORY_OWNER=${GITHUB_REPOSITORY,,} | |
echo ::set-output name=repository_owner::${REPOSITORY_OWNER%%/*} | |
- name: Build and push | |
run: ./purpur/build.sh | |
env: | |
RUNTIME_IMAGE: ${{ matrix.runtime.image }} | |
RUNTIME_NAME: ${{ matrix.runtime.name }} | |
RUNTIME_VERSION: ${{ matrix.runtime.version }} | |
RUNTIME_PLATFORM: ${{ matrix.runtime.platform }} | |
RUNTIME_OS: ${{ matrix.runtime.os }} | |
REPOSITORY: ghcr.io/${{ steps.vars.outputs.repository_owner }}/minecraft-server |