File tree Expand file tree Collapse file tree 5 files changed +24
-23
lines changed
Expand file tree Collapse file tree 5 files changed +24
-23
lines changed Original file line number Diff line number Diff line change 1111
1212permissions : {}
1313
14+ # TODO: Experiment GitHub deployments
1415# TODO: do we want to test multi-arch build?
15- # TODO: what about cache?
16+ # TODO: reproductible builds? https://docs.docker.com/build/ci/github-actions/reproducible-builds/
1617jobs :
1718 build-and-test :
1819 name : Build & Test
@@ -66,13 +67,24 @@ jobs:
6667 username : ${{ vars.DOCKERHUB_USERNAME }}
6768 password : ${{ secrets.DOCKERHUB_TOKEN }}
6869
69- - name : Build & Test
70- run : src/test/build-and-test.sh
70+ - name : Set up Docker Buildx
71+ uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
72+
73+ - name : Build
74+ uses : docker/bake-action@4ba453fbc2db7735392b93edf935aaf9b1e8f747 # v6.5.0
75+ with :
76+ source : .
77+ workdir : src/main/
78+ targets : dev
79+ load : true # Required for tests in later steps
80+
81+ - name : Test
82+ run : src/test/test.sh
7183
7284 - name : Run Trivy vulnerability scanner
7385 uses : aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0
7486 with :
75- image-ref : djaytan/papermc-server:dev
87+ image-ref : ' djaytan/papermc-server:dev'
7688 format : sarif
7789 output : results.sarif
7890
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ COPY --chown=papermc --chmod=500 runtime/start.sh ./
8383EXPOSE 25565/tcp
8484EXPOSE 25565/udp
8585
86+ # TODO: Pre-launch server to pre-download Mojang's server jar for quick startup
8687ENTRYPOINT ["./start.sh" ]
8788
8889# TODO: healthcheck
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ set -Eeuo pipefail
44
55SCRIPT_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd -P)
66
7- bash " $SCRIPT_DIR " /build-dev.sh
7+ cd " ${SCRIPT_DIR} /../main"
8+
9+ echo ' 🏗️ Building the DEV image...'
10+ docker buildx bake dev --print
11+ docker buildx bake dev
12+ echo ' ✅ Image built successfully.'
813
914echo ' ▶️ Starting the localdev PaperMC server...'
1015docker run --rm -it -p 25565:25565/tcp -p 25565:25565/udp -e EULA=true ' djaytan/papermc-server:dev'
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ # Assumption: The OCI image is already built and tagged as 'djaytan/papermc-server:dev'
23
34set -Eeuo pipefail
45
5- SCRIPT_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd -P)
6-
7- bash " $SCRIPT_DIR " /build-dev.sh
8-
96CONTAINER_NAME=' test-papermc-server'
107
118echo ' 📋 Testing the Docker PaperMC server image...'
You can’t perform that action at this time.
0 commit comments