forked from OpenWF/SpaceNinjaServer
ci: split docker amd64 & arm64 builds
This commit is contained in:
parent
d78ca91d6c
commit
61a8d01f64
25
.github/workflows/docker.yml
vendored
25
.github/workflows/docker.yml
vendored
@ -4,9 +4,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker-amd64:
|
||||||
if: github.repository == 'OpenWF/SpaceNinjaServer'
|
if: github.repository == 'OpenWF/SpaceNinjaServer'
|
||||||
runs-on: ubuntu-latest
|
runs-on: amd64
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Docker buildx
|
- name: Set up Docker buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -18,8 +18,27 @@ jobs:
|
|||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
openwf/spaceninjaserver:latest
|
openwf/spaceninjaserver:latest
|
||||||
openwf/spaceninjaserver:${{ github.sha }}
|
openwf/spaceninjaserver:${{ github.sha }}
|
||||||
|
docker-arm64:
|
||||||
|
if: github.repository == 'OpenWF/SpaceNinjaServer'
|
||||||
|
runs-on: arm64
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Log in to container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: openwf
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
platforms: linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
openwf/spaceninjaserver:latest-arm64
|
||||||
|
openwf/spaceninjaserver:${{ github.sha }}-arm64
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
spaceninjaserver:
|
spaceninjaserver:
|
||||||
|
# The image to use. If you have an ARM CPU, replace 'latest' with 'latest-arm64'.
|
||||||
|
image: openwf/spaceninjaserver:latest
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker-data/conf:/app/conf
|
- ./docker-data/conf:/app/conf
|
||||||
- ./docker-data/static-data:/app/static/data
|
- ./docker-data/static-data:/app/static/data
|
||||||
@ -8,10 +11,9 @@ services:
|
|||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
||||||
# Normally, the image is fetched from Docker Hub, but you can use the local Dockerfile by swapping the following two fields.
|
# Normally, the image is fetched from Docker Hub, but you can use the local Dockerfile by removing "image" above and adding this:
|
||||||
# Works best when using `docker-compose up --force-recreate --build`.
|
|
||||||
image: openwf/spaceninjaserver:latest
|
|
||||||
#build: .
|
#build: .
|
||||||
|
# Works best when using `docker-compose up --force-recreate --build`.
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
- mongodb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user