mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2024-11-24 16:23:10 +01:00
Also build an arm64 image
This commit is contained in:
parent
a2d351161c
commit
20befd3d9e
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@ -6,6 +6,9 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [ amd64, arm64v8 ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -25,6 +28,17 @@ jobs:
|
||||
Write-Host "Version $version"
|
||||
Pop-Location
|
||||
|
||||
docker build . --tag ghcr.io/g3rv4/fakerelay:latest --tag "ghcr.io/g3rv4/fakerelay:$version"
|
||||
docker push ghcr.io/g3rv4/fakerelay:latest
|
||||
docker push "ghcr.io/g3rv4/fakerelay:$version"
|
||||
if ('${{ matrix.architecture }}' -eq 'arm64v8') {
|
||||
sudo apt-get install qemu binfmt-support qemu-user-static
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
}
|
||||
|
||||
docker build . -t ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} --build-arg ARCH=${{ matrix.architecture }}
|
||||
docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }}
|
||||
docker push ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }}
|
||||
docker push ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }}
|
||||
|
||||
if ('${{ matrix.architecture }}' -eq 'amd64') {
|
||||
docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:latest
|
||||
docker push ghcr.io/g3rv4/fakerelay:latest
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.403-alpine3.16 AS builder
|
||||
ARG ARCH=
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.404-alpine3.16 AS builder
|
||||
WORKDIR /src
|
||||
COPY src /src/
|
||||
RUN dotnet publish -c Release /src/FakeRelay.sln -o /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.11-alpine3.16
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.12-alpine3.16-${ARCH}
|
||||
VOLUME ["/data"]
|
||||
ENV CONFIG_PATH=/data/config.json
|
||||
COPY --from=builder /app /app
|
||||
|
Loading…
Reference in New Issue
Block a user