-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
107 lines (102 loc) · 3.54 KB
/
Copy pathverify-pr.yml
File metadata and controls
107 lines (102 loc) · 3.54 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Verify PR
on:
pull_request:
branches:
- master
paths-ignore:
- "*.md"
- "docs/**"
- "examples/**"
- "notes/**"
- "kustomize/**"
- "docker-compose.yml"
- "images.json"
- "compose-docs.yml"
- "zensical.toml"
- ".readthedocs.yaml"
- "renovate.json5"
jobs:
build:
strategy:
fail-fast: false
matrix:
variant:
- java25
- java25-alpine
- java17
- java8
include:
# JAVA 21/25:
- variant: java25
# stay aligned with build.yml
baseImage: eclipse-temurin:25-jre-noble
platforms: linux/amd64,linux/arm64
mcVersion: latest
- variant: java25-alpine
baseImage: eclipse-temurin:25-jre-alpine
platforms: linux/amd64,linux/arm64
mcVersion: latest
# JAVA 17:
- variant: java17
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
baseImage: eclipse-temurin:17-jre-focal
platforms: linux/amd64
mcVersion: 1.20.4
# For GLIBC_2.34 support
knockdRepoOrg: Metalcape/knock
- variant: java8
baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64
mcVersion: 1.12.2
# For GLIBC_2.34 support
knockdRepoOrg: Metalcape/knock
# Pin version for Java 8, be sure to also set in build.yml
mcHelperVersion: 1.51.3-java8
env:
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v7
with:
# for build-files step
fetch-depth: 0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Confirm multi-arch build
uses: docker/build-push-action@v7
with:
platforms: ${{ matrix.platforms }}
# ensure latest base image is used
pull: true
build-args: |
BASE_IMAGE=${{ matrix.baseImage }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
cache-from: type=gha,scope=${{ matrix.variant }}
- name: Build for test
uses: docker/build-push-action@v7
with:
# Only build single platform since loading multi-arch image into daemon fails with
# "docker exporter does not currently support exporting manifest lists"
platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }}
# ensure latest base image is used
pull: true
# load into daemon for test usage in next step
load: true
push: false
build-args: |
BASE_IMAGE=${{ matrix.baseImage }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
cache-from: type=gha,scope=${{ matrix.variant }}
- name: Run tests
env:
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
VARIANT: ${{ matrix.variant }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
DEBUG: ${{ runner.debug }}
GH_TOKEN: ${{ github.token }}
run: |
tests/test.sh