0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-22 03:05:16 +00:00
SmoOnlineServer/.github/workflows/test-pr.yml
Robin C. Ladiges ccccdecb6a
Provide docker image (#6)
* add Dockerfile

* add docker-compose.yml

* Github workflow to build and deploy docker image

* workdir /data/ instead of /app/

* use a local directory instead of a named volume

This makes the settings.json more accessible from the outside by
default, but is less portable.

The -v command with $PWD might not work on native Windows shells, but
rather wants an absolute Windows path like C:\User\... or /c/User/...

And on Linux, because the /data/ directory and the settings.json will be
owned by root. Though that can be changed.

* more docker-compose command examples

* add linux/arm/v7 ; improve build & runtime

* fix: just arm not arm32

* test docker build for PRs

* back to the microsoft runtime
2022-07-17 13:00:31 -06:00

37 lines
835 B
YAML

name: Test PR
on:
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64,arm
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/build-push-action@v3
with:
pull : true
push : false
context : .
file : ./Dockerfile
platforms : linux/amd64,linux/arm/v7,linux/arm64/v8
cache-from : type=gha,scope=${{ github.workflow }}
cache-to : type=gha,scope=${{ github.workflow }},mode=max