2020-07-04 19:55:45 +00:00
|
|
|
name: Validate PR
|
2020-06-28 17:22:00 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
2021-12-05 00:42:03 +00:00
|
|
|
env:
|
|
|
|
IMAGE_TO_TEST: itzg/minecraft-server:test-${{ github.repository_owner }}-${{ github.run_id }}
|
|
|
|
|
2020-06-28 17:22:00 +00:00
|
|
|
jobs:
|
2020-07-11 19:09:08 +00:00
|
|
|
test:
|
2020-06-28 17:22:00 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-11-08 13:00:59 +00:00
|
|
|
- uses: actions/checkout@v2.4.0
|
2020-06-28 17:22:00 +00:00
|
|
|
|
2021-12-05 00:42:03 +00:00
|
|
|
- name: Setup Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
uses: docker/build-push-action@v2.7.0
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64
|
|
|
|
tags: ${{ env.IMAGE_TO_TEST }}
|
|
|
|
load: true
|
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|
|
|
|
|
2020-07-11 19:09:08 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
tests/test.sh
|